educratsweb logo


Send E-mail to Multiple Person(E-mail) with Php

 

 

 

<html>

<head>

<title> Send E-mail to Multiple Person(E-mail) with Php

</title>

</head>

<body bgcolor="#666666">

 <!--Email Validation START -->

        <script language="javascript">

            function validate_email(field,alerttxt)

            {

                with (field)

                {

                    apos=value.indexOf("@")

                    dotpos=value.lastIndexOf(".")

                    if (apos<1||dotpos-apos<2)

                    {

                        alert(alerttxt);return false

                    }

                    else

                    {

                        return true

                    }

                }

            }

        </script>

        <!--Email Validation END -->

 

<script language="javascript">

function checkdata()

{

if(document.emailpost.from.value=="")

{

alert("Form field should not be blank! Please Enter your Email id");

document.emailpost.from.focus();

return false;

}

else if(document.emailpost.to.value=="")

{

alert("To field should not be blank! Please Enter Destination Email id ");

document.emailpost.to.focus();

return false;

 

}

else if(document.emailpost.from.value!="")

{

if (validate_email(eval("document.emailpost.from"),"Not a valid e-mail address!")==false)

{

document.emailpost.from.focus();

return false

}

}

 

 

else

return true;

}

</script>

<form name="emailpost" action="test.php" method="post" onSubmit="return checkdata()">

  <table  cellpadding="5px" cellspacing="0px" style="font-size:12px; font-family:Verdana, Arial, Helvetica, sans-serif; border:7px solid gray; background:#eeffee" width="500px" align="center">

    <tr>

      <td colspan="2"  bgcolor="gray" style="color:#FFFFFF; font-weight:bold; padding:10px"> Send E-mail to Multiple Person(E-mail) with Php

</td>

      

    </tr>

    <tr>

      <td>Enter Your Email id</td>

      <td align="right"><input type="text" name="from" size="40" value="<? echo $_POST["from"];?>"/></td>

    </tr>

    <tr>

      <td colspan="2">Enter Your Friend Email id(s) </td>

    </tr>

    <tr>

      <td colspan="2" align="right"><textarea rows="5" cols="50" name="to" value="<? echo $_POST["to"];?>"></textarea>

        <br />

        Enter Emails Speparated by colon(,)</td>

    </tr>

<tr>

      <td colspan="2">Enter Your Message</td>

    </tr>

    <tr>

      <td colspan="2" align="right"><textarea rows="5" cols="50" name="message" value="<? echo $_POST["subject"];?>"></textarea></td>

    </tr>

    <tr>

 

      <td colspan="2"  align="right"> <input type="submit" name="action" value="Send Email" style="background:#333333; color:#FFFFFF; border:1px solid gray" onClick="return checkdata()" />

        <input type="reset"  value="Clear" style="background:#333333; color:#FFFFFF; border:1px solid gray" /></td>

    </tr>

<tr>

 

<tr>

<td colspan="2">

<div style=" background:white; padding:5px; color:#666666">

  <?

if($_POST["action"]=="Send Email")

{

$to=$_POST["to"];

$from_email=$_POST["from"];

$message=$_POST["message"];

$to_single = split (",", $to); //splite email into array 

$to_single_count_index=count($to_single); //count total index of array to_single

echo "<font color='red'>Email send to:</font><font color='green'> ";

for($i=0;$i<$to_single_count_index;$i++)

{

$to_s=$to_single[$i];

 

 $headers = "From: $from_email Reply-To: $from_email ";

    $headers .= "Content-type: text/html "; 

$mail_sub="Test Email";

mail($to_s,$mail_sub,$message,$headers);

echo $to_s,", ";

 }

 

}

?>

</font>

</div>

</td>

  </table>

</form>

</body>

</html>

 

This is a Sample code and you can change it as per your requirement. if you like this article please comment.

Send E-mail to Multiple Person(E-mail) with Php
Contents shared By educratsweb.com

Mobile Processor Gyan - nm Technology , Octa-Core, 10nm Vs 12nm Vs 7nm Explained
Published on Friday June 5 2020
if you have any information regarding Job, Study Material or any other information related to career. you can Post your article on our website. Click here to Register & Share your contents.
For Advertisment or any query email us at educratsweb@gmail.com

RELATED POST
1 Send E-mail to Multiple Person(E-mail) with Php
2 9 Emerging Technologies to Lookout for in 2019
3 गूगल फोन पर भारी डिस्काउंट
4 OPPO R17 PRO : फ़ास्ट चार्ज होगी बैटरी
5 Agricultural Technology Information Centre (ATIC)
6 BEST WAY TO COLLECT PAYMENTS ON YOUR WEBSITE
7 Agricultural Technology Information Centre (ATIC)
8 Agricultural Technology Information Centre (ATIC)
9 Buy Redmi 6 Pro starts from Rs.10999
10 Top 20 Web Crawling Tools to Scrape the Websites Quickly
11 Best Selenium Training in Chennai
12 Send personalized email messages to your contacts with Mail Merge for Gmail
13 5 Ways To Redirect A Website URL
14 National Laboratory Directory
15 A To Z List of Linux Commands
16 AnyDesk Software
17 AarogyaSetu: A multi-dimensional bridge
18 Raksh is a 360-degree proximity detection device that senses other users within its proximity and sounds a warning as soon as another device comes within its defined range
19 Make a Free Website through Google Sites
20 Science-based website on COVID 19 launched
21 Scientists observe celestial smash-up around nearby star
22 What is an API? (Application Programming Interface)
23 Computer based nano materials by INST Mohali can show the future of nano-electronics
24 DRDO develops bio suit with seam sealing glue to keep health professionals fighting COVID-19 safe
25 Ministry of MSME Launches CHAMPIONS Portal www.Champions.gov.in
26 NIT Kurukshetra Implements Enterprises Resource Planning (ERP), SAMARTH
27 National Technology Day to be celebrated focusing on rebooting the economy through S&T
28 The system has been certified for safety and performance by NABL accredited agencies and undergone stringent biomedical tests
29 Certifying Quantum Entanglement: A step towards Quantum Security
30 Prime Minister pays tributes to scientists on the National Technology Day
31 Aarogya Setu is now open source
32 To deal with COVID-19, CIPET to take up R&D initiatives in the areas of Health Care; manufacturing and Certifying PPE and other relevant products as per WHO/ ISO guidelines
33 Researchers find a new possibility to improve rice productivity
34 Live telecast of the solar eclipse has been arranged via Zoom, YouTube and Facebook
35 DST-SERB supports study for identification of structure-based potential antivirals against COVID 19
36 IT Minister Launches National AI Portal of India- www.ai.gov.in
37 Chinese hackers attempt over 40,000 cyber-attacks in 5 days on India: Maha Police
38 Detection of fluorine in hot Extreme Helium Stars solves their evolution mystery
39 NCSTC, DST in association with Vigyan Prasar organized watching of Solar Eclipse live with solar filter spectacles in the campus
40 IACS Kolkata INSPIRE faculty’s work on Black Holes and Gravitational Waves to help understanding fundamentals of our nature
41 Study showing stars of varied ages can co-exist in open clusters, provides clue to stellar evolution in the Milky Way Galaxy
We would love to hear your thoughts, concerns or problems with anything so we can improve our website educratsweb.com ! visit https://forms.gle/jDz4fFqXuvSfQmUC9 and submit your valuable feedback.
Save this page as PDF | Recommend to your Friends

http://educratsweb(dot)com http://www.educratsweb.com/content.php?id=55 http://educratsweb.com educratsweb.com educratsweb