Jump to content

Archived

This topic is now archived and is closed to further replies.

evon83

how to include .eml file??

Recommended Posts

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!

Share this post


Link to post
Share on other sites
I assume you mean 'include' as an attachment to the email message ...

Share this post


Link to post
Share on other sites
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??

Share this post


Link to post
Share on other sites
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.net/tutorials/mail2.htm = simple tutorial on mail+attachement with sample code

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
[quote author=evon83 link=topic=107531.msg431597#msg431597 date=1157895949]
but do u have the real sample of the .eml file??
[/quote]

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

[quote author=evon83 link=topic=107531.msg431597#msg431597 date=1157895949]
i really would like to know how it actually works !
[/quote]

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.

Share this post


Link to post
Share on other sites
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....

Share this post


Link to post
Share on other sites
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....

Share this post


Link to post
Share on other sites
... 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.

[quote]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....[/quote]

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.

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
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.

[quote]but only send the template to one person at a time... not all at a time..[/quote]

OK, you think about [b]ALL[/b] 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.

Share this post


Link to post
Share on other sites
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??

Share this post


Link to post
Share on other sites
My recommendation is that you forget about the .eml file and do something like this:

[code]<?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

?>[/code]

Share this post


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

Share this post


Link to post
Share on other sites
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..

Share this post


Link to post
Share on other sites
[quote author=evon83 link=topic=107531.msg431632#msg431632 date=1157899525]
ah??
but my .eml file is a very long message??!!
it includes all the instructions on how to participate and stuff??!!!!

[/quote]

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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.