I want a PHP code to send a mail using dreamhost.com what will be the code........ I know that SMTP must be use to send the mail. So please anyone who have code please give it.......
+1. See also http://stackoverflow.com/questions/1058826/how-to-send-mails-through-php-script/1058856#1058856
micahwittman
2010-01-07 07:03:25
A:
The best option would be to use the PEAR Mail Package (Here's how to use it) which may be already installed on your server. (Especially if you are using xampp or something similar.)
You can also edit your php.ini file like this:
[mail function]
SMTP = smtp.dreamhost.com
sendmail_from = [email protected]
Chaim Chaikin
2010-01-07 08:41:01
+1
A:
If you use a library like SwiftMailer it's quite simple. Have a look at their docs.
Blair McMillan
2010-01-07 10:47:44