Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending SSL email tutorial 1

Status
Not open for further replies.

alfordjj

MIS
Jul 23, 2003
80
US
Does anyone know where I can find a good tutorial on how to sending SSL email using PHP? If you Google it, you get a lot of stuff on how to set up servers for it, and about 20 different ways of sending that are all very cryptic. (Although, they say things like "I won't explain the above code because it is self-explanatory." Riiiiight....)

Any suggestions would be great. Thanks!!
 
can i just confirm? all you are wanting is to use an smtp relay via ssl? if so, use phpmailer and set the host and port you want to use as per this link

and then set $SMTPSecurity = 'ssl' (prior to the send);

don't forget that often the relevant port for secure smtp is 465 and not 25.
 
Thanks jpadie, it's getting much further than any of my other code ever did! It's still not working, though.

I'm getting the following error:

"Warning: fsockopen() [function.fsockopen]: unable to connect to smtp.domainname.net:465 (Connection timed out) in /filepath/htdocs/class.smtp.php on line 122
SMTP -> ERROR: Failed to connect to server: Connection timed out (110) Mailer Error: SMTP Error: Could not connect to SMTP host."


Any ideas? I was thinking that perhaps my hosting company has a different port activated for secure emails.

Thanks again!!
 
Well, I've got the answer. My provider doesn't support SSL emails. I called them to verify the port and they told me that it wouldn't work even with the correct port. (Which they gave me and I tried. They were right, it didn't work.)

jpadi, thanks for a great tip. It really helped me understand how to do the secured email, even if I was never able to put it into production. Star for you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top