Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Answer: How to open/what cmd's for a IMAP socket to send email to an Exchange server?

( #147018=categorized answer: print w/ replies, xml ) Need Help??

Q&A > network programming > How to open/what cmd's for a IMAP socket to send email to an Exchange server? contributed by beebware

Why not just use a standard SMTP module such as Mime::Lite, Mail::Sender or Net::SMTP? Just configure it to use the Exchange IP address, for example (MIME::Lite code follows as I like it a lot :) ):
use Mime::Lite MIME::Lite->send('smtp', $exchange_server_name_or_ip_address, TimeOut= +>60); my $msg=MIME::Lite->new ( From=>"$from_name <$from_email_address>", To =>"$to_email_address", Subject=>"$subject_of_email", Type=>'text', Data=>$body_of_email ); $msg->send;
That way you can easily change which server the mail goes out through and you don't restrict it to an IMAP only mail server. Plus Exchange has a very strange login sequence sometimes (I have to authenticate against mine in the format of 'forename.surname@localdomain.internal' or 'localdomain/forename.surname' dependent on how I'm accessing Exchange2000).
Otherwise you'll have to try Net::IMAP::Simple or Mail::IMAPClient but as I've never used either of those myself, I can't make any recommendations.

Comment on Answer: How to open/what cmd's for a IMAP socket to send email to an Exchange server?
Download Code
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2014-09-21 05:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (166 votes), past polls