Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Perl / November 2005



Tip: Looking for answers? Try searching our database.

Send authenticated mail with MIME::Lite

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mark Wheeler - 10 Nov 2005 04:30 GMT
Hi all,

Just a quick question. I've been using MIME::Lite to send emails from
my home computer as I am running a server there. But I recently
switched to DSL with SBC/Yahoo and they are blocking port 25. My mail
suddenly stopped going through. I've opted out of that, thinking that
was the problem, as they give you the option, but that didn't seem to
help. No mail is being sent from my cgi script. So I am wondering if
there is a way to send authenticated mail with MIME::Lite. I've read
the examples and docs regarding MIME::Lite and sending authenticated
mail, but can't seem to make heads or tails about it. Does any one have
an idea of how to do that? Any help would be appreciated.

Thanks,

Mark
Sherm Pendley - 10 Nov 2005 04:42 GMT
> Just a quick question. I've been using MIME::Lite to send emails  
> from my home computer as I am running a server there. But I  
[quoted text clipped - 7 lines]
> tails about it. Does any one have an idea of how to do that? Any  
> help would be appreciated.

Here's an example, taken from the MIME::Lite docs:

    ### Do something like this in your 'main':
    if ($I_DONT_HAVE_SENDMAIL) {
        MIME::Lite->send('smtp', "smtp.myisp.net", Timeout=>60);
    }

    ### Now this will do the right thing:
    $msg->send;         ### will now use Net::SMTP as shown above

If that doesn't work for you, one possible cause is that your ISP may  
be restricting outgoing email based on the "From:" header, to help  
cut down on spoofing. The ISPs that do this tend to allow you to opt  
out, because there are lots of valid reasons why you might want to  
use a different return address.

sherm--

Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
Mark Wheeler - 10 Nov 2005 06:04 GMT
Hi Sherm,

Yes, I saw that (although I didn't try it), but mail can't be sent
unless I authenticate it with my userid and password. I read something
about being able to do that with NET::SMTP. Perhaps having MIME::Lite
prepare the message, and haveing NET::SMTP sending it. But again, I'm
at a loss of how to do that. Any ideas?

Thanks,

Mark

On Nov 9, 2005, at 11:30 PM, Mark Wheeler wrote:

> Just a quick question. I've been using MIME::Lite to send emails from
> my home computer as I am running a server there. But I recently
[quoted text clipped - 6 lines]
> mail, but can't seem to make heads or tails about it. Does any one
> have an idea of how to do that? Any help would be appreciated.

Here's an example, taken from the MIME::Lite docs:

    ### Do something like this in your 'main':
    if ($I_DONT_HAVE_SENDMAIL) {
        MIME::Lite->send('smtp', "smtp.myisp.net", Timeout=>60);
    }

    ### Now this will do the right thing:
    $msg->send;         ### will now use Net::SMTP as shown above

If that doesn't work for you, one possible cause is that your ISP may
be restricting outgoing email based on the "From:" header, to help cut
down on spoofing. The ISPs that do this tend to allow you to opt out,
because there are lots of valid reasons why you might want to use a
different return address.

sherm--

Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
Carl Franks - 10 Nov 2005 09:43 GMT
Mail::Sender handles sending via authenticated smtp.

Carl
Brian Pink - 10 Nov 2005 14:39 GMT
the easiest fix for this issue is to go to the SBC DSL site and file the
request to have the ports unblocked for your account. =) it takes about
a day for them to open them up, and it's just a simple web form to fill
out.

- brian
Mark Wheeler - 10 Nov 2005 16:43 GMT
Hi Brian,

Yes, I did that, but mail is still not going through.

Does anyone know what happens to the mail when it is "doesn't go
through"?

Thanks,

Mark

On Nov 10, 2005, at 6:39 AM, brian pink wrote:

the easiest fix for this issue is to go to the SBC DSL site and file the
request to have the ports unblocked for your account. =) it takes about
a day for them to open them up, and it's just a simple web form to fill
out.

- brian
Daniel T. Staal - 10 Nov 2005 16:58 GMT
> Hi Brian,
>
> Yes, I did that, but mail is still not going through.
>
> Does anyone know what happens to the mail when it is "doesn't go
> through"?

In theory it should keep trying until the timeout period expires, which is
normally set for around 3 days on SMTP servers.  After that, an error
should be bounced back saying it didn't go through.  Some servers will
send a message earlier (commonly at the end of 12/24 hours), confirming
that they are still trying.

That assumes everyone is playing nice.  If someone is blocking selected
SMTP connections, they are already not playing nice.  They could fake an
acceptance and just drop the message, or do something else...

And, this assumes you've actually got it to the SMTP transport on your
end.  ;)

Daniel T. Staal

---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------
Mark Wheeler - 10 Nov 2005 17:44 GMT
OK.... Well... I checked out another part of my setup, namely PostFix
Enabler, which I used to set things up to send out mail. I added the
SBC smtp server, login, and password and bingo! Mail is going through
again. So apparently, I don't have to do the authentication through my
script, but just set it up though postfix. Thanks again for all you
help. I will check out Mail::Sender, though. Looks interesting. Thanks
again.

Mark

On Thu, November 10, 2005 11:43 am, Mark Wheeler said:
> Hi Brian,
>
> Yes, I did that, but mail is still not going through.
>
> Does anyone know what happens to the mail when it is "doesn't go
> through"?

In theory it should keep trying until the timeout period expires, which
is
normally set for around 3 days on SMTP servers.  After that, an error
should be bounced back saying it didn't go through.  Some servers will
send a message earlier (commonly at the end of 12/24 hours), confirming
that they are still trying.

That assumes everyone is playing nice.  If someone is blocking selected
SMTP connections, they are already not playing nice.  They could fake an
acceptance and just drop the message, or do something else...

And, this assumes you've actually got it to the SMTP transport on your
end.  ;)

Daniel T. Staal

---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------
Joseph Alotta - 10 Nov 2005 20:22 GMT
Greetings,

I want to print Avery 6140 labels with name and address from a mac.  
Is there a library.  If not, does anyone know how to set a font and  
tab a certain number of inches to print 3 columns?

Joe Alotta
David Cantrell - 11 Nov 2005 11:22 GMT
> Mail::Sender handles sending via authenticated smtp.

As does MIME::Lite 3.01_04.  That is, however, marked as being a
developer release, and the CPAN testers results are ... not good.

Y'know, I'm sure that the same question was asked just a couple of weeks
ago on one of the many lists I subscribe to.  But I can't remember which
list, or who by.

Signature

David Cantrell | Nth greatest programmer in the world

 When one has bathed in Christ there is no need to bathe a second time
     -- St. Jerome, on why washing is a vile pagan practice

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.