[Eug-lug] Sending email to a list

Rob Hudson rob at euglug.net
Mon Jul 17 11:27:12 PDT 2006


PHPMailer is a good way to go.

Return receipts are an added header.  I think this is it but you should 
verify and test:

	Disposition-Notification-To: Your Name <you at you.com>

Reading from a file is straight forward and there are examples on 
php.net's website:  http://php.net/file

Here's a copy and paste:
// Get a file into an array.  In this example we'll go through HTTP to get
// the HTML source of a URL.
$lines = file('http://www.example.com/');

// Loop through our array, show HTML source as HTML source; and line 
numbers too.
foreach ($lines as $line_num => $line) {
    echo "Line #<b>{$line_num}</b> : " . htmlspecialchars($line) . "<br 
/>\n";
}

Matthew Jarvis wrote:
> One of our vendors has issued a safety recall on one of their components 
> and we are attempting to contact all those who might have that on their 
> bikes.
> 
> The Plan is to email everyone and those that don't respond or indicate 
> receipt of the message will be sent an (expensive) certified letter.
> 
> I can build the list no problem, and write the addy's to a text file. 
> What I don't know how to do is iterate through the list, retrieve each 
> line's email addy from the file, and then send the mail with these 
> parameters:
> 
> -Return Receipt requested
> -an email address that would be different than what I'm currently logged 
> in as i.e. 'spoof' the address to be something like 
> 'safety at bikefriday.com' rather than 'root' or whatever
> -BCC to myself
> 
> Looking at phpMailer I think I could get close, but don't see a Return 
> Receipt option, nor do I know how to get in/out of the text file.
> 
> This is *just* beyond my php skills and I'm sure I could figure it out 
> eventually...
> 
> Can someone tell me if:
> 
> a) given my limited linux skills, that phpMailer is a decent way to go
> b) if phpMailer supports Return Receipt requests and I'm just not seeing it
> b) how to retrieve a line from a text file.
> 
> Thanks,
> 


More information about the EUGLUG mailing list