|
#1
|
|||
|
|||
|
Emails are sent from my account using perl & sendmail. Apparently what I need is to be able to configure the script to send email with out using any pop accounts cuz there is a 200 mail limit per hour using pop accounts and not using sendmail. (with sendmail you can send unlimited)
This is how I understand it as it was explained to me, but the whole pop email thing makes no sense, and I have used the same scripts on many servers for the last 6 months & have had no problems with limits except here. This is the script sending the mail: #!/usr/bin/perl use CGI::Carp qw(fatalsToBrowser); require "/path/to_script"; require "/path/to_script"; print "content-type: text/html\n\n"; &OPENdb; $pizza = "select * from mailer"; $red = $dbh->prepare($pizza); $red->execute(); while ($sau = $red->fetchrow_hashref()) { $id = $sau->{'id'}; $subject = $sau->{'subject'}; $message = $sau->{'message'}; $type = $sau->{'type'}; $first = $sau->{'first'}; $last = $sau->{'last'}; $mail_time = "SELECT id, list, first_name, last_name FROM mail_info WHERE list_verified='yes'and want_mail='yes'"; $mail_time2 = $dbh->prepare($mail_time); $mail_time2->execute(); while ($refer2 = $mail_time2->fetchrow_hashref()) { $ider = $refer2->{'id'}; $emailer = $refer2->{'list'}; $firster = $refer2->{'first_name'}; $laster = $refer2->{'last_name'}; $funn++; $mess = "$message"; $mess =~ s/~first~/$firster/g; $mess =~ s/~last~/$laster/g; $subj = "$subject"; $subj =~ s/~first~/$firster/g; $subj =~ s/~last~/$laster/g; $subj2 = $subj; $subj2 =~ s/ /\_/g; $slap = "SELECT ad FROM gads ORDER BY RAND() LIMIT 1"; $res = $dbh->prepare($slap); $res->execute(); while ($ref = $res->fetchrow_hashref()) { $dad = $ref->{'ad'}; open (MAIL, "|$mailprog -t"); print MAIL "To: $firster $laster <$emailer>\n"; print MAIL "From: $first $last <$bad>\n"; print MAIL "Reply-To: $bad <$bad>\n"; print MAIL "Subject:$subj [xx]\n"; if ($type eq "HTML") {print MAIL "Content-Type: text/html\n\n"; $br = "<br>"; print MAIL "===================================$br\nThis is an advertisement. Contact and unsubscribe instructions below.$br\n===================================$br\ n$br\n"; print MAIL "$mess$br\n$br\n$br\n$br\n$br\n$br\n$br\n"; print MAIL "===================================$br\n"; print MAIL "$dad$br\n"; print MAIL "===================================$br\n"; print MAIL "$disclaimer$br\n"; print MAIL "===================================$br\nYou can reply to this message with this link:$br\n<a href=\"http://www.xx.com/cgi-bin/reply.cgi?id=$id&rsub=$subj2&sender=$email er\">http://www.xx.com/cgi-bin/reply.cgi?id=$id&rsub=$subj2&sender=$email er</a>$br\n===================================$br\n $progname xx Lansing Michigan 48910 USA$br\n$br\n"; close (MAIL);} else {print MAIL "Content-Type: text/plain\n\n"; $br = ""; print MAIL "===================================$br\nThis is an advertisement. Contact and unsubscribe instructions below.$br\n===================================$br\ n$br\n"; print MAIL "$mess$br\n$br\n$br\n$br\n$br\n$br\n$br\n"; print MAIL "===================================$br\n"; print MAIL "$dad$br\n"; print MAIL "===================================$br\n"; print MAIL "$disclaimer$br\n"; print MAIL "===================================$br\nYou can reply to this message with this link:$br\nhttp://www.xx.com/cgi-bin/reply.cgi?id=$id&rsub=$subj2&sender=$email er$br\n===================================$br\n$pr ogname xx Lansing Michigan 48910 USA$br\n$br\n"; close (MAIL);} } }} $dbh->do("truncate table mailer"); &CLOSEdb; exit; I am apparently using pop accounts to send this, but I need to know how I can chage it to not using pop email accounts as my services are worthless and will have to change webhosts if I cannot send more than 200 emails in an hour. . . If anyone can help it would be very much appreciated. |
|
#2
|
|||
|
|||
|
I don't understand what you mean. It looks like you are using sendmail; that is, if $mailprog is set to /usr/sbin/sendmail. What do you mean "pop" accounts?
|
|
#3
|
|||
|
|||
|
The problem is this line of code:
print MAIL "===================================$br\nThis is an advertisement. Contact and unsubscribe Solution: Don't send over 200 mails per hour. Thats called spam. People hate spam. It slows down our servers. It slows down our connection speeds. It is the reason for the 200 mail per hour limit in the first place. I have to sort through and delete over 500 of these per day. Only send mail that people ask you to send. Rent some radio advertising space or a bill board or something. |
|
#4
|
||||
|
||||
|
The original messages dates 04-02-2004, so I guess you don't have to put your energy in solving this problem anymore.
![]() Stef. |
|
#5
|
|||
|
|||
|
I did notice that after replying.
Oh well.... My response was valid though. |
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Better Faster Support | Unregistered | Suggestions | 8 | 08-22-2004 01:35 PM |
| Language Support - Please Read | GatorJustin | Pre-Sales Questions | 0 | 04-26-2004 05:42 PM |
| Support | Tekorium | Pre-Sales Questions | 5 | 04-16-2004 10:20 PM |