Reputation: 23
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.......
Upvotes: 1
Views: 6618
Reputation: 5349
If you use a library like SwiftMailer it's quite simple. Have a look at their docs.
Upvotes: 1
Reputation: 2149
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]
Upvotes: 0