Posted by Dave Kelly on 11/04/07 03:57
Sorry for the long post, it is easier to discard information than
to have to wait for it to arrive.
So here goes:
This code worked perfectly when I was an Earthlink customer. Sprint
decided not to pardner with Earthlink and create their own IP. Since
then everything email has been broke.
Sprint/Embarq is the only copper wire DSL provider where I live.
If you need them:
class.phpmailer.php
class.stmp.php
are available here.
http://phpmailer.sourceforge.net/
I use a shell script to read the mailing list and send the
addresses to the php mailer.
#!/bin/bash
main()
{
cat testlist | ( \
while read emailaddr; \
do sendtomember $emailaddr; done \
)
}
PHP_EXEC='php -r'
sendtomember()
{
member_email=$1
php -f mailsender.php "$member_email" "two"
}
The PHP mailer:
#!/bin/php
<?php
if($_SERVER['argv'][2]=="two") {
$filename = 'todayscatch';
$fp = fopen($filename, "r");
$php_file_name = fread($fp, filesize($filename));
fclose($fp);
}
if($_SERVER['argv'][2]=="three") {
$filename = 'no_responce_message';
$fp = fopen($filename, "r");
$php_file_name = fread($fp, filesize($filename));
fclose($fp);
}
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "smtp.embarqmail.com"; // SMTP server
$mail->FromName = "Dave Kelly";
$mail->From = "daveekelly1@embarqmail.com";
$mail->AddAddress(" {$_SERVER['argv'][1]}");
if($send_report_flag != 0 ) {
$mail->AddAttachment($php_file_attachment);
}
$mail->Subject = "A message from the TexasFlyFishers email robot";
$mail->Body = $php_file_name;
$mail->WordWrap = 50;
if(!$mail->Send())
{
echo "Message was not sent ";
echo "Mailer Error: " . $mail->ErrorInfo;
}
else
{
echo "Message has been sent";
}
?>
A list of addresses might look like this.
scentual@hughes.net
hjcrofton@mail.com
daveekelly1@embarqmail.com
I get this error message"
Message was not sent Mailer Error: Language string failed to load:
recipients_failedscentual@hughes.net
Message was not sent Mailer Error: Language string failed to load:
recipients_failedhjcrofton@mail.com
Message has been sent
The message sent was to myself and showed up on my Thunderbird mail
reader.
I googled 'Language string failed to load' and found a lot of listings
with some solutions.
I applied some of those solutions and none seem to correct the
problem.
Anyone have other suggestions to fix this?
TIA
Dave Kelly
[Back to original message]
|