I'm using Mail::Sender , I'm getting the error message as
connection not established.
I'm using OpenMultipart to fill up the hash. when this error will come? how to solve this? If I send 10 mails, only 2 mails successfully send , remaining mails got this error.
$Msg = new Mail::Sender ( { smtp => SMTP_IP, debug_level => 4, port => '2255', debug => '/tmp/mail_sync.log' } ); $Msg->OpenMultipart({ from => xxxx@gmail.com, to => xxxx@gmail.com, subject => testing, debug => '/tmp/log.log', multipart => 'related', }) ->Part({ctype => 'multipart/alternative'}) ->Part({ctype => 'text/html', disposition => 'NONE', msg => " <!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN> <html> <head> </head> <body bgcolor=#ffffff text=#000000> xxxxx ( Some HTML Content ) </body> </html>" }) ->EndPart("multipart/alternative"); $Msg->Attach({ description => 'fax1 jpg', ctype => 'image/jpeg', encoding => 'base64', disposition => "attachment; filename=1111;", file => 'filename', }); $Msg->Close(); }
debug log file:
>> 220 nsmtpin.xxxxb.co.in ESMTP Service (Lotus Domino Release 8.5.2) +ready at Wed, 10 Apr 2013 00:42:28 +0530 << EHLO localhost >> 250-nsmtpin.xxxxb.co.in Hello localhost ([10.2.252.251]), pleased t +o meet you >> 250-HELP >> 250-SIZE 5324800 >> 250 PIPELINING << MAIL FROM:<xxxxx@xxxxB.com> >> 250 xxxxxx@xxxxB.com... Sender OK << RCPT TO:<xxx@xxxxB.com> >> 250 xxx@xxxxB.com... Recipient OK << DATA >> 354 Enter message, end with "." on a line by itself << To: xxxx@xxxxB.com << From: xxx.xxx@xxxxB.com << Subject: Testing << Date: Wed, 10 Apr 2013 00:35:42 +0530 << X-Mailer: Perl script "Email_Resender" << using Mail::Sender 0.8.16 by Jenda Krynicky, Czechlands << running on localhost (127.0.0.1) << under account "root" << Message-ID: <20130409_190542_084621.Mitesh.Shah@xxxxB.com> << MIME-Version: 1.0 << Content-type: multipart/related; << boundary="Message-Boundary-by-Mail-Sender-1365534342" << << This message is in MIME format. Since your mail reader does not und +erstand << this format, some or all of this message may not be legible. << << --Message-Boundary-by-Mail-Sender-1365534342 << Content-Type: multipart/alternative; boundary="Part-Message-Boundar +y-by-Mail-Sender-1365534342_2" << << << --Part-Message-Boundary-by-Mail-Sender-1365534342_2 << Content-type: text/html << Content-transfer-encoding: 7BIT << << << << <!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.0 +1 Transitional//EN> << <html> << << </html> << --Part-Message-Boundary-by-Mail-Sender-1365534342_2-- << << --Message-Boundary-by-Mail-Sender-1365534342 << Content-type: image/jpeg; name="20130408_112508_2792230080_1_4.jpg" << Content-description: fax1 jpg << Content-transfer-encoding: base64 << Content-disposition: attachment; filename=08042013/20130408_112508_ +2792230080_1_4.jpg; << << /9j/4AAQSkZJRgABAQEAzABiAAD//gAbPFVOU1BFQ0lGSUVEPgoyNzkyMjMwMDgwCv/ +bAEMABQME << BAQDBQQEBAUFBQYHDAgHBwcHDwsLCQwRDxISEQ8RERMWHBcTFBoVEREYIRgaHR0fHx8 +TFyIkIh4k << HB4fHv/AAAsIA+gDIAEBEQD/xAAdAAEAAgMBAQEBAAAAAAAAAAAABQYDBAcCAQgJ/8Q +AdhAAAQME << fWbj6/DL+rsQgf8Ad/VX4L6Wzr/beo2PTcWQpy9N3Fn0JtP/AGRwrACD9St8T9RNf1y +Ry4DkAFa7 << gHeqj8nvVvxzHbhfrq+GINvjrkPrPsQkbOvefYB7yK578HfqZL6lYhMeukL4qv0N7b8 +UoIKWHh4s << jkjkT7dBQH2VhR8HzCUFRRdcxSVq5K1kcobPbufW8+wr1/g/4Z/S+Z/rLK/aqUt3RXB +okRLDjF2m << qDnPxpd3kuOEfilXMer9VbbXSHAkNpQbQ+spAHJdxklR+snxO5r180eA/wBCufeEn95 +T5o8B/oVz << 7wk/vKfNHgP9CufeEn95T5o8B/oVz7wk/vKfNJgP9CufeEn95Uc50G6QuuKcdwKzOOL +JUpa0KUpR << PmSSrZP1mvnzBdHfzfWP/ZK/aoOgfR4EEdPrHsHf8ir++p+P0z6exw8GsKx5Pjnbn+5 +zR3217U9u << 3u1Wdvp9giEJQnDcd4pAA/3LYPYf/Fr78gMG/I3Hfutj9inyAwb8jcd+62P2KfIDBvy +Nx37rY/Yp << 8gMG/I3Hfutj9ivbWC4U0dtYjYEE+1NsYH/5Ne/kViHLl8lrHsjW/i5ny/1ayxcTxiL +JbkxsdtDD << zSgttxuC0lSFDyIITsH6xUzxH1/aacR9f2mvoGvf9tKUpSlKUr//2Q== << quit

In reply to connection not established. error in Mail::Sender by ungalnanban

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.