in reply to Net::SMTP - mass mail

You wrote:

PS: I'm not sure if this is possible but can you send an email that will display html in html compatible email readers and text otherwise? (if so how would I encorporate this into my example)

This won't help if you have to use Net::SMTP, but MIME::Lite makes it a snap to send email with multiple parts of different mime types:
require MIME::Lite; $msg= MIME::Lite->new( From => $from_addr, To => $to_addr, Bcc => $bcc_list, Subject => $subject, Type => 'multipart/alternative', ); $msg->attach( Type => 'text/plain', Data => $some_plain_text, ); $msg->attach( Type => 'text/html', Data => $some_html, );
Note that MIME::Lite can send email via Net::SMTP using the send_by_smtp method (from the pod):
send_by_smtp ARGS... Instance method. Send message via SMTP, using Net::SMTP. The opt +ional ARGS are sent into Net::SMTP::new(): usually, these are MAILHOST, OPTION=>VALUE, ... Note that the list of recipients is taken from the "To", "Cc" and +"Bcc" fields. Returns true on success, false or exception on error.

Or you can set the delivery method using the class method send:
# change the delivery method and then call vanilla instance method sen +d() MIME::Lite->send(’smtp’, "smtp.myisp.net", Timeout=>60); # ... $msg->send();

Or you can set the delivery method by providing different arguments to the instance method send:
$msg->send(’smtp’, "smtp.myisp.net");
Can you provide any more information as to why you can only use Net::SMTP ?

--sacked