in reply to Sendmail problem

To elaborate on the above response, I think the culprit is:
$sender =~ s/@/\\@/;
(Note that the s/@/\@/ in the above response do not actually change anything.) In general there shouldn't be any need to escape at-signs in your email addresses. If you do, sendmail will add @yourdomain.com to fully qualify the address.

In this line:

print MAIL "To: ???\@gmail.com\n";
you need to escape the @ only because it is in a double-quoted string and you don't want it to be interpreted as array interpolation. If you used a single-quoted string you wouldn't need the backslash. However, in previous line:
print MAIL "From: $sender\n";
there is no need to escape any at-signs in $sender - its value will be inserted without any further interpretation.

Replies are listed 'Best First'.
Re^2: Sendmail problem
by Anonymous Monk on Mar 23, 2008 at 01:52 UTC
    Thanks so much! I really appreciate your help because I spent hours on this yesterday. It works great now.