Jump to content


Photo

how to include .eml file??


  • Please log in to reply
16 replies to this topic

#1 evon83

evon83
  • Members
  • PipPipPip
  • Advanced Member
  • 32 posts

Posted 10 September 2006 - 12:15 PM

i know that eml file is a MS outlook express electronic mail????
i need to include it into my email sending to my club members.....
how can i include .eml file together with my email??

I need help on this!

thanks!

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 10 September 2006 - 12:34 PM

I assume you mean 'include' as an attachment to the email message ...
Legend has it that reading the manual never killed anyone.
My site

#3 evon83

evon83
  • Members
  • PipPipPip
  • Advanced Member
  • 32 posts

Posted 10 September 2006 - 12:49 PM

yes.....how to do that??
is it just put include "file.eml"??
sth like that??
but it's not  .inc file???!!
will that affect my email sending process??

#4 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 10 September 2006 - 01:06 PM

You can't "include" it, it needs to be sent as an attachment.  At least that's what I think you're asking.

http://www.litfuel.n...rials/mail2.htm = simple tutorial on mail+attachement with sample code
Legend has it that reading the manual never killed anyone.
My site

#5 evon83

evon83
  • Members
  • PipPipPip
  • Advanced Member
  • 32 posts

Posted 10 September 2006 - 01:45 PM

I have to attach it??
oh i see...
but do u have the real sample of the .eml file??
i really would like to know how it actually works !
please...thanks!

#6 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 10 September 2006 - 01:52 PM

but do u have the real sample of the .eml file??


It's your .eml file. If you don't have one then use the 'save as' option in Outlook.

i really would like to know how it actually works !


It works the same way regardless of what the attachment is.  You can see if it actually works by trying it with an image attachment.
Legend has it that reading the manual never killed anyone.
My site

#7 evon83

evon83
  • Members
  • PipPipPip
  • Advanced Member
  • 32 posts

Posted 10 September 2006 - 02:07 PM

so the sample code that you provided, it can be replaced by anything???
hrmmm....my .eml file is only a document....
how to attach to it??
sorry im a bit confused here....

#8 evon83

evon83
  • Members
  • PipPipPip
  • Advanced Member
  • 32 posts

Posted 10 September 2006 - 02:11 PM

and from my .eml file..i need to substitute/replace some of the attributes such as $name and $email???!!
that's what confuse me the most....

#9 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 10 September 2006 - 02:14 PM

... a file is a file is a file whether it's an image or a pdf of a word document or a text file.  Assuming you know the name and location of a file (and it obviously needs to be on your server), I don't see why that code wouldn't work.  Give it a try.

and from my .eml file..i need to substitute/replace some of the attributes such as $name and $email???!!
that's what confuse me the most....


This is starting to make less sense as it goes on.  I'm wondering if what you mean is you want to use a 'template' for the mail message and substitute individual names and email addresses in sending the message to each 'member' separately.

To: {their name @ their email }

Dear {their name} etc.
Legend has it that reading the manual never killed anyone.
My site

#10 evon83

evon83
  • Members
  • PipPipPip
  • Advanced Member
  • 32 posts

Posted 10 September 2006 - 02:16 PM

yes....something like a mail-merged???
but the template is in .eml file format....

any idea how to do it??
im totally confused...i dunno how to solve the problem...

#11 evon83

evon83
  • Members
  • PipPipPip
  • Advanced Member
  • 32 posts

Posted 10 September 2006 - 02:18 PM

but only send the template to one person at a time... not all at a time..

#12 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 10 September 2006 - 02:22 PM

Well, you're going to have to extract the actual content from your .eml file so that you can construct a 'blank' message - as text and html - that you can use.

but only send the template to one person at a time... not all at a time..


OK, you think about ALL of your requirements first. Then post details of all of them in a single thread. Then people here can provide a constructive response to solve the final problem.  This apparently has nothing to do with including an eml file that gets modified on the fly, it probably has everything to do with turning the content of some eml file into usable text/html - something you have to do by hand - and then modifying it depending on who/where you want it sent.
Legend has it that reading the manual never killed anyone.
My site

#13 evon83

evon83
  • Members
  • PipPipPip
  • Advanced Member
  • 32 posts

Posted 10 September 2006 - 02:30 PM

so let say im writing this code.php....and i wanna include this activate.eml file into my php code.....how can i do that????
and the .eml file i have to pass the $name and $email from code.php to .eml file??!!

how can i do that??
shall i put include "activate.eml" file on top of my code.php file??


#14 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 10 September 2006 - 02:40 PM

My recommendation is that you forget about the .eml file and do something like this:

<?php
$msg="Dear ". $member;
$msg.= "\n\nThank you for your whatever it was.\n\n";
$msg.= "And whatever else you want to say";

... then use the mail() function to send the message contained in the string $msg

?>

Legend has it that reading the manual never killed anyone.
My site

#15 evon83

evon83
  • Members
  • PipPipPip
  • Advanced Member
  • 32 posts

Posted 10 September 2006 - 02:45 PM

ah??
but my .eml file is a very long message??!!
it includes all the instructions on how to participate and stuff??!!!!


#16 evon83

evon83
  • Members
  • PipPipPip
  • Advanced Member
  • 32 posts

Posted 10 September 2006 - 02:48 PM

indeed mail() is very simple and straightforward....
but.....i need to include the .eml file for sure...cuz
im just editing the existing file that i have...

i have been given the task on how to link these two files together (code.php & activate.eml) files...
that's why im still struggling on solving the problems..


#17 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 10 September 2006 - 03:19 PM

ah??
but my .eml file is a very long message??!!
it includes all the instructions on how to participate and stuff??!!!!


Yeah, but it's still only text that can be added to a string, no matter how long it is.  .eml files are not just the message, they have all the email headers and other 'stuff' in them ... which is why you can't "just include" it and why I persist in saying you need the usable content from the eml, not the whole thing.  And nobody says you can't include html links in the message.
Legend has it that reading the manual never killed anyone.
My site




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users