PHP Send Email Using Authenticated SMTP Mail Server In Real Time

PHP has mail() function to send an email to users. However this mail() will not work:

=> If sendmail (or compatible binary) is not installed

=> If Apache Web server / Lighttpd running in chrooted jail

=> And your smtp server needs an authentication before sending an email

=> Or you just need to send email using PHP PEAR

In all these cases you need to use PHP PEAR’s Mail:: interface. It defines the interface for implementing mailers under the PEAR hierarchy, and provides supporting functions which are useful in multiple mailer backends. In this tip you will learn about how to send an e-mail directly to client smtp server in real time.

PHP Pear’s Mail.php is located in /usr/share/pear/ directory. Following is sample code to send an email via authenticated smtp server.

PHP send email using PHP SMTP mail Pear functions – Sample source code

Following code is well commented, you need to make necessary changes as per your setup.

/* mail setup recipients, subject etc */
$recipients = "";
$headers["From"] = "";
$headers["To"] = "";
$headers["Subject"] = "User feedback";
$mailmsg = "Hello, This is a test.";
/* SMTP server name, port, user/passwd */
$smtpinfo["host"] = "";
$smtpinfo["port"] = "25";
$smtpinfo["auth"] = true;
$smtpinfo["username"] = "smtpusername";
$smtpinfo["password"] = "smtpPassword";
/* Create the mail object using the Mail::factory method */
$mail_object =& Mail::factory("smtp", $smtpinfo);
/* Ok send mail */
$mail_object->send($recipients, $headers, $mailmsg);

Sending smtp email from chrooted Apache or Lighttpd webserver

Read following section, if you are running a secure chrooted Apache or Lighttpd web server. I have already written about setting php mail() function in chrooted jail. If you are using chrooted jail server setup, copy all files from /usr/share/pear directory to /chroot-directory/usr/share/pear directory. For example if lighttpd chrooted jail located in /webroot directory, you need to type following commands to install PHP pear support:
# mkdir -p /webroot/usr/share/pear
# cd /webroot/usr/share/pear
# cp -avr /usr/share/pear .

If PHP SAFE MODE is on, you must set /webroot/usr/share/pear directory permission to webserver username to allow access. Otherwise you will see error as follows:

1-Nov-2006 09:43:19] PHP Warning:  main(): SAFE MODE Restriction in effect.  The script whose uid is 506 is not allowed to access /usr/share/pear/PEAR.php owned by uid 0 in /usr/share/pear/Mail.php on line 636.

So if webserver username is lighttpd or apache use following command to setup correct ownership:
# chown lighttpd:lighttpd /webroot/usr/share/pear -ROR# chown apache:apache /webroot/usr/share/pear -R

You may also find modified wordpress WP-ContactForm plugin useful. It is a drop in form for users to contact you. It can be implemented on a page or a post. Original authored by Ryan Duff, which use php mail() function to send email. I have modified the same to send email via my ISP authenticated gateway using PHP PEAR’s Mail:: interface 😀

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 80 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
80 comments… add one
  • Loren Dorez Jan 27, 2007 @ 23:02

    Im currently working on a PHP Mail File.. Essentiall it needs to log into a webbased mail account like ‘Outlook Web Access’. All tutorials i see you a submit button to the caling and send of the php file. Can i use the onclick evern like such


    or must i use a sbumit button for the form. A submit buttons doesnt work with the current setup but i could model it to if it is neccessary..

  • subhendu das Jan 29, 2007 @ 7:51

    i need help for windows environment.
    i use php triad 4.0.1

  • subhendu das Jan 29, 2007 @ 7:53

    How i configure smtp server.
    i need help for windows environment.
    i use php triad 4.0.1

  • 🐧 nixCraft Jan 30, 2007 @ 12:50


    I don’t use Windows so I have no idea about Windows SMTP server configuration.

  • gurjeet singh Feb 2, 2007 @ 9:54

    hi i got this error

    Warning: main(Mail.php): failed to open stream: No such file or directory in /home/meresaja/public_html/mailtest.php on line 2

    Fatal error: main(): Failed opening required ‘Mail.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/meresaja/public_html/mailtest.php on line 2

    any body help me

  • niteen Feb 7, 2007 @ 17:14

    you need to install pear in your server

  • Vincent Feb 19, 2007 @ 16:00

    Ok I would like to hide the SMTP authentication from the web directory i.e. put it out of the path of public html, how would I call the functions for authentication in this case, also I want to e.mail the details of a form before it is posted or as it is being posted…..

  • 🐧 nixCraft Feb 20, 2007 @ 4:46

    PHP is server side technology; as long as it is configured properly no one is going to see your SMTP authentication information.

  • Sia.G Mar 31, 2007 @ 12:02

    Ok so my mailtest.php seems to have worked as I get my confirmation message. I just never receive the e-mail. ANyone know what’s going on?

  • Jackie May 8, 2007 @ 15:59

    I’ve been trying to send emails using the PHP mail() function but it looks like the mails are not being sent. What do I need to configure on my windows server to get it to work?

  • Mateus Pezzin May 23, 2007 @ 6:13

    Thank’s a lot!

    This sample is awesome!

    I used with Mime to send attachments in the mail.

  • Kiran S May 27, 2007 @ 12:36

    I am not that good with php..its working when done stand alone.. i customized the code given by u to fit my text fields.. but didn’t work.. cud you give me some tips so that i can make it fit for my site

    Kiran S

  • MANOJ Jun 28, 2007 @ 9:02

    I’ve been trying to send emails using the given php code in file named contact.php
    Its showing error

    Parse error: syntax error, unexpected ‘@’ in /home/paragpap/public_html/contact.php on line 5

    What do I need to configure on my linux server to get it to work?

    Please help…


  • mazen Mar 25, 2008 @ 19:23

    any download zip file ?

  • ehmeidan Apr 16, 2008 @ 10:10

    thanks for this thing

  • Uma Mahesh Jun 10, 2008 @ 14:56

    i downloaded Mail package that contain a folder with Mail.php, Mail/*.php.
    the code testmail.php was in the folder of Mail.php and when i execute it is asking for PEAR.php
    i could not finid it.
    Plz tell me how to install Pear on the server to

  • Jake Jun 13, 2008 @ 10:51

    can i check with you guys,
    i have a sever currently installed with Apache,

    i written a script in php to send emails out.
    what do i need to install other than:
    PHP5 and SMTP mail server?

  • Vikrant Jul 15, 2008 @ 12:16

    this code work for me, but I am not able to send attachment with mail. can anyone help me?

  • Uma Mahesh Jul 15, 2008 @ 13:59

    plz tell me how did u do it?

  • CrazyGuy Jul 18, 2008 @ 8:02

    .scroll {font-weight:bold; font-size:36; text-align: center; font-family: Verdana,

    Courier, Courier New;}

    // globals
    var initialx, initialy, scrolltext;
    var frame = 0, frame2 = 0.5;
    var amplitude1 = 50, amplitude2 = 30;
    var offset = 0.2, speed = 0.2, speed2 = 0.35;
    var offset2 = 0.6;
    var scrollspeed = 6;
    var charwidth = 30;

    var twopi = Math.PI * 2;
    var chracters, position, numvisible, nextchar, firstchar;
    var skipsteps = 1;
    var delaytimer = 0;
    var interval;

    // function to create sine scroller
    function sinescroll (x, y, value, number_of_chars)
    // setup globals
    scrolltext = new String(value);
    initialx = x;
    initialy = y;
    numvisible = number_of_chars;
    nextchar = numvisible;
    firstchar = 0;

    // create fixed-size arrays of characters and positions
    characters = new Array(numvisible);
    position = initialx;

    // write DIVs to hold characters
    for (var i = 0; i < numvisible; i++)
    scrolltext.charAt(i), ”);

    // animation function
    function step ()
    // increment counters
    frame += speed;
    frame2 += speed2;

    // delay timer
    if (delaytimer > 0)
    // update position
    position -= scrollspeed;

    // check for ‘offscreen’
    if (position < (initialx – charwidth))
    while (scrolltext.charAt(nextchar) == ‘|’)
    delaytimer += 90;

    // set nextchar into characters array
    characters[firstchar].innerHTML = ” +

    scrolltext.charAt(nextchar) + ”;

    // update nextchar

    // check for wrap-around
    if (nextchar >= scrolltext.length)
    nextchar = 0;

    // change position and counters by offset
    position += charwidth;
    frame += offset;
    frame2 += offset2;

    // update firstchar

    if (firstchar >= numvisible)
    firstchar = 0;

    // wrap-around counters
    if (frame > twopi) frame -= twopi;
    if (frame2 > twopi) frame2 -= twopi;

    // set up loop variables
    var angle = frame;
    var angle2 = frame2;
    var pos = position;

    // update the html
    for (var i=firstchar; i < numvisible; i++)
    characters[i].style.left = pos;
    characters[i] = initialy + amplitude1 * Math.sin(angle) +

    amplitude2 * Math.sin(angle2);
    angle += offset;
    angle2 += offset2;
    pos += charwidth;

    for (var i=0; i < firstchar; i++)
    characters[i].style.left = pos;
    characters[i] = initialy + amplitude1 * Math.sin(angle) +

    amplitude2 * Math.sin(angle2);
    angle += offset;
    angle2 += offset2;
    pos += charwidth;

    // start the animation
    function start ()
    if (!document.all)
    // get all of the DIV tags into an array (IE only?)
    characters = document.all.item(‘character’);

    // setup timeout to call this function again
    interval = window.setInterval(“step();”, 20);

    // stop the animation
    function stop ()
    if (!document.all)
    if (interval)


    // create the scroller
    if (document.all)
    sinescroll(30, 100, “HI I Need to send more than one message field how can i do pls give me a solution Thanks. “, 15);

  • CrazyGuy Jul 18, 2008 @ 8:03

    HI I Need to send more than one message field how can i do pls give me a solution Thanks.

  • peji Jul 20, 2008 @ 6:30

    how can run without Mail.php?

  • Vikrant Jul 24, 2008 @ 11:24

    hi Uma Mahesh,
    u required xamplate which give u php and mysql, you also find mail.php file in it. just include it in this code.

  • Nuno Sep 6, 2008 @ 20:37

    Hi i tryed the code but it just give me this as answer in my browser:

    send($recipients, $headers, $mailmsg)

    Can anyone help me figure out what is the problem?


  • Digital Lynx Oct 1, 2008 @ 9:02

    You could do all of that, but it’s pretty easy to do the above with the mMail library found here:

  • Joseph McLaughlin Oct 24, 2008 @ 20:39

    When I run the php file in the browser I just get a blank page (also View Source is a blank page) no messages. I places an echo ‘Done” ; as the last statement and that doesn’t print.

    Any thoughts anyone?

  • 🐧 nixCraft Oct 24, 2008 @ 20:47


    Run php -i script.php to see error from the shell prompt.

  • Joseph McLaughlin Oct 26, 2008 @ 14:27


    When I run “php -i smtp_test.php” from the terminal command prompt it returns 438 lines of definitions of properties, variables, etc., but I am unable to locate anything that appear to be errors.

  • 🐧 nixCraft Oct 26, 2008 @ 14:50


    Opps, -i will return phpinfo(); it should be:
    php script.php

  • Joseph McLaughlin Oct 26, 2008 @ 16:43


    That works. It was a path issue on include(“/usr/share/pear/Mail.php”). When I moved smtp_test.php into the /usr/share/pear/ directory it sent the email, but that won’t work for me as my email scripts are in /var/www/vhosts//httpdocs/mailer/. Can I copy the PEAR PHP files into my mailer directory?

  • khalid Dec 12, 2008 @ 10:29

    help me. :S

    not working at my end.

  • Julius Dec 26, 2008 @ 3:12

    Hello I found this code helpful but it works stand alone, How can I use it if I want to get all the data (name, email and message of the sender ) from a form in a html file or a contact form in SWF.


  • Ace Jan 14, 2009 @ 8:42

    not sure I follow

  • Ruben Zevallos Jr. Jan 25, 2009 @ 12:52

    Hi, I’m looking for a 100% PHP sample… thanks for your post

  • sandhiya Jan 29, 2009 @ 8:08

    Please tell me how i set mailmsg in html format in $mail_object->send($recipients, $headers, $mailmsg);

  • andres navarro Apr 15, 2009 @ 22:55

    Do you know how can i send an html mail using pear ?

  • articles submit May 6, 2009 @ 0:09

    I got error : Fatal error: Undefined class name ‘mail’ line no 15 : $mail_object =& Mail::factory(“smtp”, $smtpinfo); how to fix this

  • Robbie Smith May 14, 2009 @ 4:05

    Any reason why I’m getting this error:
    Failed to connect to [SMTP: Failed to connect socket: No route to host (code: -1, response: )]

  • Caspar Jul 14, 2009 @ 13:11

    I get this error whenever trying to use the mail function on my WAMP server:

    “Warning: mail() [function.mail]: Failed to connect to mailserver at “localhost” port 25, verify your “SMTP” and “smtp_port” setting in php.ini or use ini_set() in C:Program Fileswampwwwregister.php on line 61″

    What do I need to do?

    Thanks alot.

    • suraj Dec 14, 2012 @ 19:34

      give me answer this type problem

      Warning: mail() [function.mail]: Failed to connect to mailserver at “localhost” port 25, verify your “SMTP” and “smtp_port” setting in php.ini or use ini_set() in C:wampwwwSurajemail sentsend_email.php on line 24

  • Caspar Jul 14, 2009 @ 13:27

    Don’t worry – sorted it.

  • derek Sep 3, 2009 @ 10:45

    i am getting this error
    Warning: mail() [function.mail]: Failed to connect to mailserver at “localhost” port 25, verify your “SMTP” and “smtp_port” setting in php.ini or use ini_set()

    can someone guide me so that i can use the mail() successfully

  • ashim Sep 4, 2009 @ 5:03

    hey derek i have the same problem….. if u got it sorted out…… please let me know……

  • Thapar Nov 11, 2009 @ 21:06

    I have been using the following script to send a simple echoes “Good” as per the coding..but mail doesn’t appear in recipient’s inbox..!
    My system configuration is Mac OSX 10.4.11..I have XAMPP installed on my Mac..and when I am trying to send mail..I have internet connectivity ( quite obvious ).
    SMTP host is set to “localhost”..and port is set to 25.

    $message = “Hi..n Test message n from site”;
    $message = wordwrap($message, 70);
    if(mail(‘’, ‘Mail Check’, $message)==true)
    echo “Good”;
    else echo “Not able to send mail”;
    Do I need to install anything any SMTP server or anything else..?
    PS.- I have only XAMPP installed on my Mac for this purpose.

  • sangeeta Nov 26, 2009 @ 18:49

    somebody help me please

    I am very frustrated as this scipt not sending the activation email to user.
    i tried a lot.
    this is script code from 1 to 105—————————————————————

    is_valid) {
    die ("Image Verification failed!. Go back and try again." .
    "(reCAPTCHA said: " . $resp->error . ")");
    $user_ip = $_SERVER['REMOTE_ADDR'];
    $md5pass = md5($_POST['pwd']);
    $host = $_SERVER['HTTP_HOST'];
    $host_upper = strtoupper($host);
    $path = rtrim(dirname($_SERVER['PHP_SELF']), '/\');
    $activ_code = rand(1000,9999);
    $usr_email = mysql_real_escape_string($_POST['usr_email']);
    $user_name = mysql_real_escape_string($_POST['user_name']);
    $rs_duplicate = mysql_query("select count(*) as total from users where user_email='$usr_email' OR user_name='$user_name'") or die(mysql_error());
    list($total) = mysql_fetch_row($rs_duplicate);
    if ($total > 0)
    $err = urlencode("ERROR: The username/email already exists. Please try again with different username and email.");
    header("Location: register.php?msg=$err");
    $sql_insert = "INSERT into `users`
    (`full_name`,`user_email`,`pwd`,`address`,`tel`,`f ax`,`website`,`date`,`users_ip`,`activation_code`, `country`,`user_name`
    mysql_query($sql_insert,$link) or die("Insertion Failed:" . mysql_error());
    $user_id = mysql_insert_id($link);
    $md5_id = md5($user_id);
    mysql_query("update users set md5_id='$md5_id' where id='$user_id'");
    // echo "Thank You We received your submission.";
    $message =
    "Thank you for registering with us. Here are your login details...n
    User ID: $user_name
    Email: $usr_email n
    Passwd: $_POST[pwd] n
    Activation code: $activ_code n
    *****ACTIVATION LINK*****n
    Thank You
    __________________________________________________ ____
    mail($usr_email, "Login Details", $message,
    "From: "Member Registration" rn" .
    "X-Mailer: PHP/" . phpversion());
    header("Location: thankyou.php");

    somebody please help me what to do.


  • subhash Jan 8, 2010 @ 5:15

    please provide me full codding of mail function.
    How to configure;
    changes configure;
    html coding

  • Ramya Jan 20, 2010 @ 3:38

    Hai Friends,
    I am new to php.just now i tried to send email from localhost but i am getting the following error.,

    Warning: include(Mail.php) [function.include]: failed to open stream: No such file or directory in D:wampwwwSamplekkk.php on line 2

    Warning: include() [function.include]: Failed opening ‘Mail.php’ for inclusion (include_path=’.;C:php5pear’) in D:wampwwwSamplekkk.php on line 2

    Fatal error: Class ‘Mail’ not found in D:wampwwwSamplekkk.php on line 15

    Please tell me how to include Mail.php…

    Thank You….

    • ben Oct 10, 2011 @ 19:33

      Go to your command line (if linux or mac) and type “pear install –alldeps mail” without the quotes and you are done.

      If you are on windows, check this url … i don’t know for windows

  • Joseph Kurt Feb 25, 2010 @ 0:50

    how to use external smtp mail server that im going to use in my site for sending emails

  • And1 Apr 16, 2010 @ 20:06

    I have installed Pear Mail package but same error

    Warning: require(Mail.php) [function.require]: failed to open stream: No such file or directory in /home/chemisaq/public_html/test_message.php on line 3

    Fatal error: require() [function.require]: Failed opening required ‘Mail.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/chemisaq/public_html/test_message.php on line 3

    I Installed it using CPanel Software Service.. PEAR PACKAGE.. anyway returns that error

  • yinka web May 21, 2010 @ 16:15

    The script worked just fine for me and saved me lots of time.

  • Jill Barnes May 27, 2010 @ 3:57

    I am new to Forms, and would like to know what steps I have to do to create a “Contact Us” form that when the form button “Submit” is clicked, it sends two emails – one to the customer confirming the information supplied, and one to the site owner with all the details.

    I can create the form using Dreamweaver CS4, but after that I don’t know what to do. all my coduing has been in HTML to date.

    I would appreciate any ideas and sugfgestions


  • PREM KUMAR Aug 14, 2010 @ 10:36

    Its work good thanks…………
    Good sharing……..

  • Jason Jan 19, 2011 @ 18:41

    Wow, people are still finding and commenting on this thread so I’ll add my experience.

    On RHEL I did a:

    yum install php php-pear

    then a:

    pear install Net_SMTP

    but the Mail.php that is included in the above script did not exist.

    Tried to do a:

    pear install Mail but was thrown:

    pear/Mail requires PEAR Installer (version >= 1.5.6), installed version is 1.4.9

    So I just used the example script that includes Net/SMTP.php instead found here:



    • ben Oct 10, 2011 @ 19:34

      fyi: an easier way is to do “pear install -alldeps mail” which will install all the dependencies of mail such as net_smtp.

  • Gabriel May 10, 2011 @ 19:03

    this script works great.can you help me to change it to a bulk mailer ?

  • Shashi Jun 6, 2011 @ 8:05

    I customised this script to fit my needs, and when i executed it, i did not get any errors, but the mail too was not sent. Dont know what was going wrong.

  • Rahul Malik Jul 4, 2011 @ 13:41

    wen i execute this code my browser is giving me the following error
    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 6144 bytes) in C:xampphtdocsmaileradminmail.php on line 3

  • Darshan Jul 6, 2011 @ 12:11

    your codes run well ,m just want to know how would i send attachment with this mail

  • kim Sep 23, 2011 @ 13:23

    hey can you give me mail.php file directly 4 download.. i need it .

  • SkiOne Oct 1, 2011 @ 22:50

    For those of you looking for mail.php you need 2 things installed on your server:
    and pear Mail

    pear is a package for PHP that gets installed after PHP is compiled. If pear is not installed you need to do so at the OS level. If you own your own server then look up installing pear for your OS (ubuntu is apt-get install pear) if you are on a shared server your provider will need to have that library installed for you. And if its not, then you probably won’t get them to do it.

    Once pear is installed on your system you can install it with this command. Pear install Net_SMTP. There might be dependencies of other things but you just can’t have mail.php in your home directory and include it that way. It just doesn’t work like that.

    Hopefully this is helpful.

  • Crez Oct 11, 2011 @ 20:50

    Make sure that when you’re testing this check the php.ini file and double check that include_path has the path for the “pear” folder. It should read include_path .:/usr/share/php:/usr/share/pear or where ever yours might be installed. I edited the php.ini to include this file path and restarted apache2 and in my php code in did the include(“Mail.php”) with a Capital M and this cleared up my problem. I figured I would share my solution to help out with anyone else that might be having some issues.

  • Abbas Uddin Oct 17, 2011 @ 9:22

    I got this message after last step of this tutorial. Would you please help?

    Deprecated: Assigning the return value of new by reference is deprecated in E:xamppphpPEARMail.php on line 154

    Strict Standards: Non-static method Mail::factory() should not be called statically in E:xampphtdocsemail.php on line 60

    Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in E:xamppphpPEARMailsmtp.php on line 365

    Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in E:xamppphpPEARNetSMTP.php on line 339

    Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in E:xamppphpPEARNetSMTP.php on line 344

  • SkiOne Oct 17, 2011 @ 12:50

    That error is non-fatal, you have strict standards on. If you lowered your reporting to normal the errors will go away.

    Otherwise you can edit the files listed in the error and you will see on those lines object declarations with an & in them. Remove the & and everything will work right. I wish Pear would fix this in their library.

  • hany Oct 21, 2011 @ 3:00

    Thanks , it works great!

  • Astika Jan 10, 2012 @ 6:34

    what should the Mail.php file contains.

  • Hammad Jan 12, 2012 @ 12:35

    what code Mail.php contain ?

  • Alison Smythe Jan 16, 2012 @ 17:59

    I am a newbie to actively playing which means this sort of advice is very useful.

  • gagan Mar 19, 2012 @ 10:14

    where to find the “Mail.php” file??????????????

    • lalit Sep 13, 2014 @ 6:39

      i am also wetting for this answer

  • João Apr 12, 2012 @ 21:00

    How can i add HTML headers??

    Can someone help

  • Dar Aug 14, 2012 @ 22:07

    Didn’t work for me at first but after changing host to “localhost” worked. Any ideas why it didn’t work with domain name

  • Madhu Nov 21, 2012 @ 6:25

    After download i extract them into my folder and then include “mail.php ” and write the same code but it was not working.
    else what can i do.

  • suraj Dec 14, 2012 @ 19:32

    Warning: mail() [function.mail]: Failed to connect to mailserver at “localhost” port 25, verify your “SMTP” and “smtp_port” setting in php.ini or use ini_set() in C:wampwwwSurajemail sentsend_email.php on line 24

    how did I solve it reply fast with answer
    regard :suraj saxena

  • NAZIM Jan 12, 2013 @ 6:02


  • lalit Sep 13, 2014 @ 5:52

    where to download Mail.php file to include in this code

    send($recipients, $headers, $mailmsg);

  • rikshita Sep 11, 2015 @ 8:15

    how to send link in email?

    please help me and send php code.

  • hamed Dec 16, 2015 @ 11:55

    Thanks, script worked just fine for me and saved me lots of time.

  • krushio Feb 1, 2016 @ 16:35

    where is the mail.php code ?????

  • aTechy May 7, 2016 @ 15:07

    I love this site had come to this site many times for tech assistance
    keep up the good work and more updates please:)

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum