Gossamer Forum
Home : General : Perl Programming :

email gets marked as spam

Quote Reply
email gets marked as spam
hey, i am sending an email to the user when they register containing an activation link. the problem is that it gets marked as spam (hotmail) and goes into the bulk mail folder or if they user has thier settings to delete spam automatically, then it never gets delievered. its not the contents as it also happens with the code below. i am not sure what i am doing wrong.

thanks
pedge

Code:
my $mailprog = "/usr/sbin/sendmail -t";
my $adminmail = 'OwnAgent <register@***.com>'; #also tried this without the angle brackets and name.open MAIL, "|$mailprog" || die &error('$!');
print MAIL "To: ****\@hotmail.com\n";
print MAIL "From: $adminmail\n";
print MAIL "Subject: test\n";
print MAIL "Content-type: text/plain\n\n";
print MAIL "test";
close MAIL;
Quote Reply
Re: [pedge] email gets marked as spam In reply to
if anyone has a similar problem i found a solution.
1. the admin email address, i added a name to it.
2. i added a space between email address and new line.
3. i also added some extra headers.

it seems to work ok now.

my $mailprog = "/usr/sbin/sendmail";
my $adminmail = 'A Name <register@****.co.uk>'; # added name
open MAIL, "| $mailprog -t" || die &error('$!');
print MAIL "To: $email \n"; #added space here
print MAIL "From: $adminmail \n";
print MAIL "Subject: New Member Registered\n";
print MAIL "Content-Type: text/plain\n"; #added header
print MAIL "Content-Transfer-Encoding: 8bit\n"; #added header
print MAIL "Content-Disposition: inline\n"; #added header
print MAIL "$message";
close MAIL;
Quote Reply
Re: [pedge] email gets marked as spam In reply to
Thats a simple one....
Hotmail seems to have declared anything with an active link as spam.
Therefore, do not have active links.

Works for me - I have a mass mailer site.