PHP how to send an email ?

Back to programming.

moderator    (2009-03-31)


PHP how to send an email ?

How to send an email in PHP ?  This can be done very simply or with many parameters, here is an example that should work in most cases and more important, the emails should be accepted by most email providers such as Hotmail, Yahoo & AOL :

$boundary = "_".md5 (uniqid (rand()));

$from = "MIME-Version: 1.0\n";
$from .= "From: ".$webmaster." \n";
$from .= "Reply-to: ".$site." <".$webmaster.">\n";
$from .= "X-Sender: <www.".strtolower($site).".com>\n";
$from .= "X-Mailer: PHP\n";
$from .= "X-auth-smtp-user: ".$webmaster." \n";
$from .= "X-abuse-contact: ".$webmaster." \n";
$from .= "Content-Type: text/html; charset=UTF-8; boundary=".$boundary."\n";

$subject = '';
$message = '';

$message .= '<br><br><br>This email was generated automatically by <a href="'.$site_http.'">'.$site_http.'</a><br><br>';

$to = $email;


You just have to change $webmaster & $site, of course.

See also

More websites

You must register to see these links, as this is a collaborative page, then you may change the order of the links by clicking the icons before the titles.

Other websites

The following links might be less relevant, please change their ranks if you find them useful.

 How to Send Email from a PHP Script - About Email
email.about > cs

 PHP: Collect Feedback And Email It To Yourself - web.blazonry
blazonry > scripting

 Send email using the PHP mail() function : PHP Scripts and Programs Email Systems Scripts Directory
advancescripts > detailed/814

No part of this website may be reproduced, copied and/or distributed...
Trademarks are property of their respective owners Site Developed...

 Send email using the PHP mail() function - Totally PHP
totallyphp > code/send email using the

 PHP Send Email Using Authenticated SMTP Mail Server In Real Time
cyberciti > tips/howto

# chown lighttpd:lighttpd /webroot/usr/share/pear...
/* Create the mail object using the Mail::factory method...

 php won't send to email? -
mac forums > forums/os x darwin development/69655

Hi I am a relatively new web developer and have set up...

 How do I use PHP mail to send emails from my website?
hostmysite > support/linux/programming

 Sending email with PHP - This tutorial will teach you how to send email using PHP's mail function. We will make sure our form is filled our properly a...
webgeekworld > web development resource details.

 Php Send Email Problem
astahost > info.

This textarea will convert to Rich-Text automatically (IE, Firefox,...
hey plzzzz all exceperinced pepole in php can you describe step by...

 php code to send html email
htmlcodetutorial > help/ftopic13397

 How to Create and Send an HTML Email Form Using PHP
discountdomainsuk > articles/9/345/0

Affordable Web Site Design and Low Cost Web...

 Contacting Senator Dodd | U.S. Senator Christopher J. Dodd
dodd.senate > index.

Want to learn more about Senator Dodd or how the Senate works?...

 Simple php form to send an email by using mail function. - Dedicated Server Hosting | VPS Hosting | Virtual Private Servers Forum
bodhost > forum Rmail for PHP: How to send email with attachments and/or HTML (MIME) emails with PHP
phpguru > static/htmlMimeMail5

 Free send php email Download - send php email Software
wareseeker > free send

var pageOptions = { 'pubId' : 'pub-8098918000470057', 'channel' :...
7) { alert('can not compare more than 8...

 MIME E-mail message sending (mail, email, mime, html) - PHP Classes
phpclasses > browse/package/9

 Sending Attachments Using Email Function In Php
trap17 > index.

 Make contact form and send email in PHP
phpjabbers > make contact form and send email in

 PHP mail() function send two email, one is empty
forums.digitalpoint > showthread.

I use PHP Mail() Function to send confirmation emails - some don't...
Advertise virtually anything for relatively cheap with our full...

 Bulk Email Send at PHP Software Informer > download

extract Email addresses from local files(any type),web pages and send...
PackPal Bulk Email Server is a safe and fast bulk email...

 Download Send Email Php Source Codes, Send Email Php Scripts - Email Reminders by cogit8, FlashFormMail by futre and more...
sourcecodeonline > list?q=send email

Our email form generator is an application that is written in PHP...
NebuMailer is a Flash 5 based email form that does form validation,...

 Send an email attachment in PHP « Tim Bennett’s Blog
drquincy > blog/send an email attachment in

 PHP form to send html email with attachment [Archive] -
phpbuilder > board/archive/index.

Did you do some correction on your first reply, it's either my eyes...

 PHP, Web and IT stuff » Blog Archive » How to check if an email address exists without sending an email?
webdigi > blog/2009/how to check if an email address exists without sending an e

can anyone present us the implementation of this solution in VB6 ?...
CAP Marketer - How to check if an email address exists without...
alguna funcion php para verificar existencia de un correo? -...

 Send Email via Flash and PHP
actionscript > resources/articles/82/1/Send Email via Flash and

Staff JavaScript Application Developer for Multiplatform...
- More ActionScript, Flash and Flex jobs in the Employment...
and was formerly a Flash developer, teacher, author and...

 php script to send link in email - ProgrammingTalk
programmingtalk > showthread.

 PHP won't send email--wamp with wordpress - BitNami Forums
bitnami > forums/forums/11/topics/548

 php: simple code to send HTML email - Web Hosting Talk - The largest, most influential web hosting community on the Internet
webhostingtalk > showthread.

Canadian Government Releases Data Center Email Consolidation...
Great Mohammed but if i need this email send it...
Colocation Provider CyrusOne Plans 1 Million Square Foot Data Center...

 Sending e-mails with PHP How to send e-mails using the PHP function mail().

function provides a boolean result, it can be tested with...

 PHP - Send HTML Email Using PHP tutorial
tutcity > tutorial/send html email using

 PHP Email Form - Email Form Script - PHP Send E-mail
php.about > od/advanced

Create Email Aliases and Forwarding Addresses in...
Creating a Mailto Link - Linking to Email on Web...

 How to send MIME email in PHP
blog.brezovsky > en text 7

Přidružení bezdrátové sítě se z neznámého důvodu...
How to synchronize time in CentoOS linux from NTP...
DBF External table is not in the expected format...

 The symfony Cookbook | * | symfony | Web PHP Framework
symfony project > cookbook/1 0/en/email

Creative Commons Attribution-Noncommercial-No Derivative Works...

 AddThis Social Bookmarking Sharing Button Widget
addthis > bookmark.

 PHP script to send html email | Other CMS
discussions.drupal > node/2240

 Free Fake Email - Send Fake Mail Pranks Anonymously for Free

 How to send email with PHP -
anyexample > programming

 Sending E-Mail with PHP
bytes > serversidescripting

 Forcing PHP users to send email via SendMail - cPanel Forums
forums.cpanel > showthread.


Guest name   (option)     Register
Please sum : 2631 + two  

Trackbacks : If you talked about this article in your blog or website, you may instantly get a backlink 
There's no trackback at the moment.