Jump to content

how to include .eml file??


evon83

Recommended Posts

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

Archived

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

×
×
  • Create New...

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.