Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending e-mail to AOL.com

Status
Not open for further replies.

youthman

Programmer
Apr 28, 2004
49
US
Good afternoon!
I know that this question has been asked before (Specifically in thread219-303984 ) but because it has been archived, I couldn't read any of the replies! I need to get this fixed! I have a customer that manages a database of their customers in an SQL database. Periodically they send out an e-mail to all their customers. The code for the e-mail part of the script is this:

Code:
 open(MAIL, "| $sendmail") or print "Cant open Sendmail: $!\n";
    print MAIL "To: $to\n";
    print MAIL "From: $from\n";
    print MAIL "Reply-to: $from\n";
    print MAIL "Subject: $form_subject\n\n";
    print MAIL "$form_body";
 close MAIL;
Everything appears to work fine . . . EXCEPT . . . NO EMAIL TO ANY AOL account goes through! It is not returned, it is not put in spam, it just vanishes!

Does ANYONE have any Tips, Tricks, Ideas, or Helps to make these e-mails go through?!?!?

Thanks for the help!
The Youthman
 
Could be the volume of emails has triggered someone in AOL to blacklist your domain for spamming.

What sort of figures?
What's the purpose of the email/audience? If technical, they're less likely to have an aol domain email as their primary. (Assumption mine ;-))

How many mails we talking here 100's, 1000's ...

I assume these are all opt-in email addresses?


Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
try sending an email to one AOL address with your code and see if that works, but try it from a different domain. If that works, try sending one email to an AOL address using the code on the current domain you are running it from. AOL will block entire domains/IP blocks because of spamming. Also make sure the subject line is not something a spam filter is blocking.
 
Thanks for these suggestions.
The e-mail program works fine from this domain to ALL e-mails that are NOT aol!
When an e-mail is sent from this domain using an e-mail program, it works fine, so it is not blocked.
The subject line is something like: Website sign up confirmation
Currently we are talking about 8 e-mail addresses being sent to AOL, and 27 e-mails total. I wouldn't think this should cause any red-flags.
Yes, by technicallity, these ARE Opt-In. The e-mails that are being blocked are a direct response to their desire to sign up on my customers website.

More help PLEASE!!! I'm getting desperate!!!!

The Youthman
 
It appears to me that you are missing some code. Maybe I am wrong though. Are you gonna use smtp to send the mail or another protocol?

HTH - Stiddy
 
I am NOT using SMTP, I am using the server's sendmail program. Would SMTP help?
 
#Maybe some of this will help you. Maybe not. Anyway, here you go.....

#!D:\\perl\\bin\\perl -w

use Net::SMTP;
use Net::ping;

# Declare varibles as being blank presently #############
my ($to_user, $from_user, $mailserver, $hostname, $host);
#########################################################


$hostname = "blah-blah";
$host = Net::ping->new("icmp") or die "Can't create new ping object: $!\n";

if ($host->ping($hostname, 5)){
print "$hostname is alive\n";
} else {Email();}


sub Email {
# Gather our input to the user
$mailserver = 'xxxxxxxxxxxx';
$to_user = "xxxx\@xxx.xxx.xxx";
$to_cc_user = "xxxx\@xxxx.xxx.xxx";
$from_user = "Perl_Ping_program";
print "Sending email to Server $mailserver\n";
print "To user $to_user\n";
print "From $from_user\n";

# Make sure to remove all trailing \n characters
chomp ($mailserver);
chomp ($to_user);
chomp ($from_user);
#chomp ($to_cc_user);

# Create our SMTP connection
my $smtp = Net::SMTP->new("$mailserver") or
die "Can't create SMTP connection: $!\n";

# Tell our mail server what user we are sending as
$smtp->mail($from_user);

# Tell it who we are trying to send to
$smtp->to($to_user);
$smtp->cc($to_cc_user);

# Start actually sending the body of our message
$smtp->data();
$smtp->datasend("Subject: Connectivity Perl Ping Program\n\n");
$smtp->datasend("$hostname is not reachable\n");
$smtp->datasend("Please contact helpdesk as this matter is important\n\n\n\n");
$smtp->datasend("#################################################\n");
$smtp->datasend("#TITLE: AUTO_PING_PROGRAM Ver_1.0 #\n");
$smtp->datasend("#AUTHOR: Stiddy #\n");
$smtp->datasend("#CONTACT NUMBER: \(xxx\) xxx\-xxxx EXT\.279 #\n");
$smtp->datasend("#COMPANY: xxx xxxx Services #\n");
$smtp->datasend("#DEPARTMENT: xxxxxxxxxx#\n");
$smtp->datasend("#################################################\n");
$smtp->datasend();
$smtp->quit;
}

HTH - Stiddy
 
dont know. try it and see. I think you have to download the NET:SMTP module

HTH - Stiddy
 
I am not sure what this means, but when I run the above script, it says, "icmp ping requires root privileges at line 23" I am not sure what this means! Any other help, or help with this?
 
And I have Net::SMPT and NET::ping installed on the server.
 
you don't need to ping the server before you send email

if you decide you do for some reason - you can use another protocol for the ping, try tcp instead

Mike

I am not scrutable. [orientalbow]

Want great answers to your Tek-Tips questions? Have a look at faq219-2884

 
###try this then

#Maybe some of this will help you. Maybe not. Anyway, here you go.....

#!D:\\perl\\bin\\perl -w

use Net::SMTP;
#use Net::ping;

# Declare varibles as being blank presently #############
my ($to_user, $from_user, $mailserver, $hostname, $host);
#########################################################


$hostname = "blah-blah";
#$host = Net::ping->new("icmp") or die "Can't create new ping object: $!\n";

#if ($host->ping($hostname, 5)){
# print "$hostname is alive\n";
#} else {Email();}


sub Email {
# Gather our input to the user
$mailserver = 'xxxxxxxxxxxx';
$to_user = "xxxx\@xxx.xxx.xxx";
$to_cc_user = "xxxx\@xxxx.xxx.xxx";
$from_user = "Perl_Ping_program";
print "Sending email to Server $mailserver\n";
print "To user $to_user\n";
print "From $from_user\n";

# Make sure to remove all trailing \n characters
chomp ($mailserver);
chomp ($to_user);
chomp ($from_user);
#chomp ($to_cc_user);

# Create our SMTP connection
my $smtp = Net::SMTP->new("$mailserver") or
die "Can't create SMTP connection: $!\n";

# Tell our mail server what user we are sending as
$smtp->mail($from_user);

# Tell it who we are trying to send to
$smtp->to($to_user);
$smtp->cc($to_cc_user);

# Start actually sending the body of our message
$smtp->data();
$smtp->datasend("Subject: Connectivity Perl Ping Program\n\n");
$smtp->datasend("$hostname is not reachable\n");
$smtp->datasend("Please contact helpdesk as this matter is important\n\n\n\n");
$smtp->datasend("#################################################\n");
$smtp->datasend("#TITLE: AUTO_PING_PROGRAM Ver_1.0 #\n");
$smtp->datasend("#AUTHOR: Stiddy #\n");
$smtp->datasend("#CONTACT NUMBER: \(xxx\) xxx\-xxxx EXT\.279 #\n");
$smtp->datasend("#COMPANY: xxx xxxx Services #\n");
$smtp->datasend("#DEPARTMENT: xxxxxxxxxx#\n");
$smtp->datasend("#################################################\n");
$smtp->datasend();
$smtp->quit;
}

HTH - Stiddy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top