Cr41s3
By:
Cr41s3

Sending mails via PHP (SSL)

December 8, 2014 1.5k views

Hey guys.

I configured my mail server as in the following guide:
https://www.digitalocean.com/community/tutorials/how-to-configure-a-mail-server-using-postfix-dovecot-mysql-and-spamassasin
Now I am trying to send mails via PHP using this library:
https://github.com/PHPMailer/PHPMailer

But the problem seems the SSL (cert). I am not sure if the script is not able to establish a connection or if the problem is the unverified SSL cert.
Do you guys have any idea?
Should I use startssl oder starttsl in the script?

Thanks in advance
Cr41s3

Edit:
Errors:

SSL_accept error from x.com[x.x.x.x]: 0
Dec  8 17:45:23 x postfix/submission/smtpd[13479]: warning: TLS library problem: 13479:error:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca:s3_pkt.c:1258:SSL alert number 48:

2 comments
  • You should debug your script for errors. Or another problem can be a misconfiguration if you didn't follow the tutorial through.
    Anyway, i have a mail server with Postfix, Dovecot, SpamAssasin and i configured it successfully by following this article.

  • So I've never debugged my scripts before.
    Do you have any link or tutorial for me?

    Thanks in advance

Be the first one to answer this question.