Scott K Purcell [mailto:[EMAIL PROTECTED]] wrote:
> Sent: Tuesday, May 09, 2000 4:53 AM
> To: Perl-Win32-Users Mailing List
> Subject: Assistance With Net::SMTP V2
> 
> 
> Hello,
> I am considering using the Net::SMTP module.
> 
> I did the examples in the POD, and can send a email to 
> myself. Except for I 
> can't figure out how to get a "subject line", or a "proper 
> from line" or 
> even an attachment. Anyway, the documentation is vague (at least to 
> myself.).

Net::SMTP gives you everything you need to send email, but no more. You have
to do some things yourself. The module takes care of the SMTP envelope, and
you must specify the message headers. You can do something like this:

$header = qq(From: "Scotticus Purcellicus" <[EMAIL PROTECTED]>\n)
        . qq(To: "Marcus Thomicus" <[EMAIL PROTECTED]>\n)
        . qq(Subject: This is my subject\n)
        . qq(Importance: High\n) # Marks message with "!" in Outlook
        . qq(X-Arbitrary: Any other headers you might want\n)
        . qq(\n);

Append your message to this before sending. This will take care of your
Subject and "proper" from line, etc.

> 
> So anyway, I searched the ActiveState Users Archives, and found a few 
> instances of Net::SMTP. As I scanned them for information, I 
> noticed a 
> correlation that kept showing a Mail::Sender module.
> So if I want to send emails with subject-lines, froms, to 
> multiple people and even attachments, do I use the 
> Net::SMTP module all by itself, or do I 
> need another module that does the attachments, subject-lines, etc.?

You can do all of this with Net::SMTP. Mail::Sender may save you a few steps
because it has methods for attaching mail, etc. Net::SMTP is arguably more
standard, but to my knowledge isn't bundled with any distributions of perl
(though I would really like to see libnet bundled with Perl).

--
Mark Thomas
[EMAIL PROTECTED]

---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to