How do I send an e-mail through SMTP

Posted 4 months ago by pdc

I'm trying to send mails through the mailhub of my Internet Service Provider (Telenet). Previously, I've done the same using the simple-smtp linux package.

The configuration was as follows:

[email protected]
[email protected]

To make this successful, I also had to set up following reverse aliases in sSMTP. For each Linux user who wants to send emails - let's say www-data since that's the user that runs the webserver.

root:[email protected]:smtp.telenet.be:587
pi:[email protected]:smtp.telenet.be:587
no-reply:[email protected]:smtp.telenet.be:587
www-data:[email protected]:smtp.telenet.be:587

I've already set up my environment file with the credentials to connect to the Telenet mailhub. This works as expected. However, PHP complains about missing reverse aliases.

Expected response code 250 but got code "550", with message "550 5.1.0 <[email protected]> is not an alias of [email protected]"

Where can I set up these reverse aliases to allow the www-data user to send emails on behalf of [email protected]

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.