Hello
How can I send emails by accessing SMTP?
I want to use smtp.gmail.com.
How can do it in PHP page?
Thanks
Printable View
Hello
How can I send emails by accessing SMTP?
I want to use smtp.gmail.com.
How can do it in PHP page?
Thanks
There's the mail() function. After that, it's just a matter of configuration. (Rather complicated configuration in Unix.)
In linux you shouldn't need to use an SMTP server as the majority of distributions come with a mail transfer agent installed and configured.
But SMTP is better I think.
It's most certainly not. Why would you want to relay that email through another server when you can connect directly to the recipients MTA? It means more hops the for email and an increased chance of something happening to cause the email to go missing.Quote:
Originally Posted by onh1986
Also, if you are using the gmail SMTP server you would no doubt have to supply a user name and password. This is not supported by the mail function so you will have to write you own using sockets.
I want to send from my Google Email because my website emails go to Junk and sometimes they aren't sent (there's a problem in my website server), so I want to send my emails from my Google Email.
You'd need use a mailer class instead then. I have one of my own but you'd probably prefer to use one of the better documented ones out there. :p
How can I use mailer class?
http://www.google.co.uk/search?q=php...ient=firefox-a
Download it, extract it, read the documentation, use it. :)