Sending email via PHP


Sending mail through PHP is very simple. PHP has a function called mail() which can be invoked to send an outbound mail through SMTP. The mail() function is limited to sending mails through the machine it is called from - it cannot be used to send mails using a remote SMTP server.

Basic requirements of the mail function are the recipient's address, message subject and message data. Returns TRUE if the mail was successfully accepted for delivery, FALSE otherwise. Below is an example on howto send a mail with complete headers:




Further information can be found at :
http://us2.php.net/manual/en/function.mail.php


There is an advanced tutorial for this at:
http://www.phpfreaks.com/tutorials/130/0.php
  • 205 Utenti hanno trovato utile questa risposta
Hai trovato utile questa risposta?

Articoli Correlati

How do I set up my email in Outlook Express?

MediaCatch has made it easy to set up your e-mail on Outlook Express and can be set up by just...

How to set up a default address that receives all unrouted e-mail

With MediaCatch, you can set up so that all unrouted e-mail can be sent to one account. For...

How does e-mail forwarding work?

E-mail forwarding lets you create an e-mail address which will redirect all incoming mail into...

Troubleshooting Outlook Express Error 0x800CCC92

Symptom - you get the following (or similar) error message when trying to retrieve email from a...

Why do I get this error? Protocol: SMTP, Port: 25, Secure(SSL): No, Error Number: 0x800CCC0B

You may receive this error in your email client settings at some point. In Outlook this is a bug...