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 Chris 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 re-build e-mail

Status
Not open for further replies.

gnubie

Programmer
Apr 16, 2002
103
US
OVERVIEW:
My goal is to prepare three categories of e-mail on my PC upload each to a server to send it. The three categories of e-mail are 1) plain text, 2) plain HTML, and 3) HTML w/images. I'm using MIME::Lite to prepare all three categories. So far no problem.

PROBLEMS:
1. What is the best MIME::Lite format to locally save the e-mail in for MIME::Lite on the server to use it?
$str = $msg->as_string; ? or
$str = $msg->body_as_string; ?
other?

2. Once uploaded, how do I use MIME::Lite to re-build the e-mail using the prepared data?
- If I save the whole message, is there a facility to just send it?
- If I save the body only and create a new object, can I leave out the Type and Data and do an attach? What would the necessary contstructs be?

NOTE:
I'm preparing the e-mail locally so all of the images can be process locally and not have to be uploaded.
 
Not to pry, but what exactly are you using this code for? If you have the access to the server, why not just implement the script there and then you can use (Mime::Lite object)->send(); to send the messages, without having to pass them to the smtp server directly?

-------------
Derek F.
 
It is for an e-mail distribution application. The users only have web access to the server. The idea is for the users to prepare the messages (including embedded images) using a local application and then upload them to the e-mail distribution application for distribution.

GN
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top