PHP Classes

eml files

Recommend this page to a friend!

      MIME E-mail message sending  >  MIME E-mail message sending package blog  >  How Can PHP Send Emai...  >  All threads  >  eml files  >  (Un) Subscribe thread alerts  
Subject:eml files
Summary:sending eml file
Messages:7
Author:livingdead
Date:2005-06-21 13:33:25
Update:2007-04-30 20:05:50
 

  1. eml files   Reply   Report abuse  
Picture of livingdead livingdead - 2005-06-21 13:33:25
Hi

I would like to knwo if and how I could send eml file with your class.

Regards

david

  2. Re: eml files   Reply   Report abuse  
Picture of livingdead livingdead - 2005-06-21 13:52:02 - In reply to message 1 from livingdead
Hi

I complete.

I need to send .eml file as the main email, and not to send it as attachement (as your class provide).

regards

david

  3. Re: eml files   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2005-06-22 00:49:12 - In reply to message 1 from livingdead
If you mean forward another message, you can just split the headers and the body and call the mail function directly.

  4. Re: eml files   Reply   Report abuse  
Picture of Carol Castro Carol Castro - 2006-01-18 17:15:38 - In reply to message 3 from Manuel Lemos
Hi Miguel,

I have the same question.

I need to send an email (.eml - it's necessary to be an .eml file) but NOT as as a forward message and yes as a email body. Is there anyway to do this with your class?

Thanks!

Carol

  5. Re: eml files   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2006-01-18 17:53:25 - In reply to message 4 from Carol Castro
You see, most of the work of the class is to compose a message. However, eml files are messages already composed. So, the message composition capabilities are not needed.

As I mentioned, what you can do is to open .eml file, read its header lines one be one until you find an empty line as that is where the body part starts.

Then you can call the mail() function pass the message body, To:, Subject: and other headers to the right parameters.

  6. Re: eml files   Reply   Report abuse  
Picture of florin andrei florin andrei - 2007-04-30 19:22:12 - In reply to message 5 from Manuel Lemos
Can you give an example of sending an eml as a main body mail ?

  7. Re: eml files   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2007-04-30 20:05:50 - In reply to message 6 from florin andrei
An eml file is just a message with headers and body together.

The test_forwarding_message.php script demonstrates how to forward an eml message file as attachment.

If you just want to resend the message contained in the eml file, just split the headers from the body and compose a new message with the same relevant headers and the same body using the class function Mail().