Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Mail - bouncing back to admin email?

Quote Reply
Mail - bouncing back to admin email?
Hello!

I've got a postcard system running, but undelivered postcards are being bounced back to the admin's email instead of going to the email address of the sender.

Can anyone tell me how to make the bounced postcards go to the sender rather than coming back to me?

Here's the code I'm using - r_email and s_email are recipient and sender's email vars.

Code:

my $mail = new GT::Mail (
to => "$r_email",
from => "$s_email",
subject => "$KIWICONFIG->{kc_subject}",
msg => "$body",
smtp => $CFG->{db_smtp_server},
sendmail => $CFG->{db_mail_path},
debug => $Links::DEBUG
) or return 0;

Thanks,

r
Quote Reply
Re: [ryel01] Mail - bouncing back to admin email? In reply to
You should use the
Errors-To: user@email.com
mail header line, so the user will get the errors.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Mail - bouncing back to admin email? In reply to
In Reply To:
You should use the
Errors-To: user@email.com
mail header line, so the user will get the errors.


Thanks webmaster33

So I just add that in like this?

Code:
my $mail = new GT::Mail (
Errors-To => "$s_email",
to => "$r_email",
from => "$s_email",
subject => "$KIWICONFIG->{kc_subject}",
msg => "$body",
smtp => $CFG->{db_smtp_server},
sendmail => $CFG->{db_mail_path},
debug => $Links::DEBUG
) or return 0;

regan
Quote Reply
Re: [ryel01] Mail - bouncing back to admin email? In reply to
Well, I'm not sure how GT::Mail handles non-standard header options...
Try if works your supposed solution, and send a test email.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Mail - bouncing back to admin email? In reply to
yip that worked perfectly - thanks webmaster33!

this is the final code:

Code:
my $mail = new GT::Mail (
'Errors-To' => "$s_email",
'to' => "$r_email",
'from' => "$s_email",
'subject' => "$KIWICONFIG->{kc_subject}",
'msg' => "$body",
'smtp' => $CFG->{db_smtp_server},
'sendmail' => $CFG->{db_mail_path},
'debug' => $Links::DEBUG
) or return 0;

regan
Quote Reply
Re: [webmaster33] Mail - bouncing back to admin email? In reply to
Errors-To is actually a non-standard header where its use is discouraged (see rfc2076). You should be using the Return-Path header, which GT::Mail should be automatically setting if you don't set one yourself (it'll use your From address).

Adrian

Last edited by:

brewt: Dec 12, 2005, 6:19 PM
Quote Reply
Re: [brewt] Mail - bouncing back to admin email? In reply to
Thanks Adrian for the additional info!

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [brewt] Mail - bouncing back to admin email? In reply to
Hi Adrian

I never had a "Return-Path" set as you can see from original post above - and if someone sent an email to an address that didn't exist it was being bounced back to the admin email - not the senders email as you suggest it should be doing?

I'm using Links version... 2.0.5

Regan

Last edited by:

ryel01: Dec 13, 2005, 12:56 PM
Quote Reply
Re: [ryel01] Mail - bouncing back to admin email? In reply to
Are you using smtp or sendmail?

Adrian
Quote Reply
Re: [brewt] Mail - bouncing back to admin email? In reply to
Hi adrian

I've got a xServe running OSX with Postfix - which has a Sendmail interface.

regan
Quote Reply
Re: [ryel01] Mail - bouncing back to admin email? In reply to
See if using smtp mode adds in the header for you.

Adrian