Re: Sending mail



Date sent: Wed, 24 Jan 2007 21:54:47 -0500
From: "M. Lewis" <cajun@xxxxxxxxxxxx>
To: beginners@xxxxxxxx
Subject: Sending mail


I've used MIME::Lite for the mail tasks I've had up till now and it
has worked very well. Now I need to send mail via a different port
than port 25, say port 587. As far as I can tell, MIME::Lite does not
have this capability.

You must have missed something. The $hostname and %options passed in

$mail->send('smtp', $hostname, %options);

are passed to Net::SMTP->new() and one of the available options is
Port. So

$mail->send('smtp', 'hostname', Port => 587);

should work fine. The docs of the Net::* modules generaly leave a lot
to be desired and the Port option is not documented (in Net::SMTP
2.29), but the code accepts it and I think it's very unlikely the
option will go away.


Jenda
===== Jenda@xxxxxxxxxxx === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery

.



Relevant Pages

  • Re: No incoming SMTP mail
    ... Yes, I can telnet to port 25, at least I think I can, when I do, I get: ... I am sending mail out using a smarthost at DynDns.org as I always have. ... >>I built a new server with the same domain name as the old one. ...
    (microsoft.public.windows.server.sbs)
  • Re: No incoming SMTP mail
    ... Yes, I can telnet to port 25, at least I think I can, when I do, I get: ... I am sending mail out using a smarthost at DynDns.org as I always have. ... >>>I built a new server with the same domain name as the old one. ...
    (microsoft.public.windows.server.sbs)
  • Re: Outgoing mail question
    ... Port 587 is NOT a non-standard port. ... MUA should not be sending mail to port 25 as that's ... Exchange Server configuration and not Microsoft Outlook. ...
    (microsoft.public.outlook.installation)
  • RE: SMTP Problems on server with McAfee VirusScan 8.0
    ... Could be the "Prevent mass mailing worms from sending mail" port blocker. ... > The scripts calling the SMTP is just your ordinary vb.net mail script. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: I can receive email but not send email
    ... firewall to see if things work. ... receiving mail but port 25 isn't open for sending mail. ...
    (microsoft.public.outlook)