in reply to Re: EMail problem in outlook
in thread EMail problem in outlook

When I am sending mail Linux box to outlook it goes fine but when I am sending mail via MS Exchange server it gives me this error. I am using Mime::Lite+Net::Smtp(or Mail::Sender)

Replies are listed 'Best First'.
Re^3: EMail problem in outlook
by james2vegas (Chaplain) on Aug 25, 2009 at 10:35 UTC
    That wasn't quite what your original post said. There should be no difference. Both servers should send the mail as is, and neither should show the html mail as your message (because of the wrong disposition type) in Outlook.
      Can you figure out what is the problem in this code. I am using same code for sending email to outlook
      ############# Code Start ############################# #!/usr/bin/perl use Mail::Sender; $sender = new Mail::Sender ######### MS Exchange SMTP server #################### {smtp => '', from => 'chandan.kumar\@nmforest.loc'}; #$recipients = "chandan.kumar\@yahoo.co.in"; $recipients = "chandan.kumar\@nmforest.loc"; if (ref $sender->OpenMultipart({ from => 'chandan.kumar\@nmforest.loc', to => $recipien +ts, subject => 'chandan Embedded Image Test', boundary => 'boundary-test-1', multipart => 'related'})) { ##################### I have to send this part msg as inline ######### +############# $sender ->Attach( {description => 'html body', ctype => 'text/html; charset=us-ascii', #encoding => '7bit', disposition => 'inline', file => 'file2.html', }); ################### I have to send this part msg as Attachment ###### +############### $sender ->Attach( {description => 'html body', ctype => 'text/html; charset=us-ascii', #ctype => 'text/html', #encoding => '7bit', #disposition => 'inline', file => 'auth_sasl.pl', }); $sender->Close() or die "Close failed! $Mail::Sender:: +Error\n"; } else { die "Cannot send mail: $Mail::Sender::Error\n"; } exit; ################ Code End ##################