Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mime::Lite changed all Net::SMTP mail 2

Status
Not open for further replies.

1DMF

Programmer
Joined
Jan 18, 2005
Messages
8,795
Location
GB
Does anyone know why ever since I installed MIME:Lite, even emails I send not using MIME:Lite but just NET:SMTP, seem to arrive with the HTML content as an attachment instead of being in the body of the email.

Thanks,
1DMF.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
installing mime::lite should have no affect on anything else besides the emails sent using the module. You probably have to fiddle around with the encoding type or mime type to get the html in the body of the email instead of as an attachment.

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
well i've used Net:SMTP for years , my code has not changed, but all emails that used to work fine now have .htm attachments instead of the body of the email.

The only thing I can think of that has changed is installing Mime:Lite, purely to enable the attachment of files to emails, as Net:SMTP isn't capable of sending attachments.

If this isn't the culprit, I'm lost to what has changed to make 5 year working code start doing this out of the blue.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Fair enough, but you say even when you don't use Mime::lite you still get the attachment. I don't know how the Mime::lite module could be responsible for that. [dazed]

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Have you tried upgrading Net::SMTP? That module uses some MIME modules (that may have been affected when you installed MIME::Lite) for encoding/decoding.
 
Thats a good suggestion. I think they do share MIME::base64 (or something like that) so it is worth looking into.

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
Thanks for the suggestions, funny how I scoured Net:SMTP and could not find any method to add attachments, then installing MIME:lite seemed to change Net:SMTP into sending the email body as an attachment.

In the end I opted for re-writing my send_mail() function using MIME:Lite instead , so now no email is sent via Net:SMTP but MIME:Lite instead.

Well if you can't beat em, join em, it wasn't really that much of a code change , so no biggie.

cheers,
1DMF.




"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top