You are not logged in.

#1 2015-04-28 17:45:43

K-Jtan
Member
Registered: 2013-11-03
Posts: 5

[Fixed] PHP errors are sent by email. How to configure who is recei...

Hi,

I recently installed on my computer the SSMTP package (SSMTP wiki guide). Seems to be working fine. I restarted my computer a few days later and one of my cronjob (a PHP script) started to send emails to say I have a warning inside the script.

The problem is the email is sent to the wrong person. It takes my username and appends @gmail.com. The problem I want to change it to my email address (username@gmail.com exists and it's not me).

How could I change that ?

Last edited by K-Jtan (2015-04-28 18:23:36)

Offline

#2 2015-04-28 17:51:17

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [Fixed] PHP errors are sent by email. How to configure who is recei...

By defining aliases. The wiki includes an example.

Edit: actually I'm not sure whether that works for "To:" as well...

Last edited by Raynman (2015-04-28 17:54:16)

Offline

#3 2015-04-28 17:54:22

K-Jtan
Member
Registered: 2013-11-03
Posts: 5

Re: [Fixed] PHP errors are sent by email. How to configure who is recei...

Raynman wrote:

By defining aliases. The wiki includes an example.

These are my two alias in my /etc/ssmtp/revaliases

Note my_username = firstname

root:firstname.lastname@gmail.com:smtp.gmail.com:587
my_username:firstname.lastname@gmail.com:smtp.gmail.com:587

the emails are still forward to firstname@gmail.com

Last edited by K-Jtan (2015-04-28 17:55:31)

Offline

#4 2015-04-28 18:01:26

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [Fixed] PHP errors are sent by email. How to configure who is recei...

Yes, hence my edit. I read your post too quickly (and it's the first time I see a question about the "To" side).

Do you have

Root=firstname@gmail.com

in ssmtp.conf? Or no "Root" setting at all (although I wouldn't expect it to add @gmail.com in that case)?

Because it says

# The user that gets all the mails (UID < 1000, usually the admin)

Last edited by Raynman (2015-04-28 18:04:30)

Offline

#5 2015-04-28 18:05:51

K-Jtan
Member
Registered: 2013-11-03
Posts: 5

Re: [Fixed] PHP errors are sent by email. How to configure who is recei...

Raynman wrote:

Yes, hence my edit. I read your post too quickly (and it's the first time I see a question about the "To" side).

Do you have

Root=firstname@gmail.com

in ssmtp.conf? Or no "Root" setting at all (although I wouldn't expect it to add @gmail.com in that case)?

I just checked and I have

root = postmaster

Last edited by K-Jtan (2015-04-28 18:07:01)

Offline

#6 2015-04-28 18:21:59

K-Jtan
Member
Registered: 2013-11-03
Posts: 5

Re: [Fixed] PHP errors are sent by email. How to configure who is recei...

Fixed I change postmaster for firsname.lastname.

Tested and works.

Thank you for the hints Raynman

Offline

Board footer

Powered by FluxBB