evon83 Posted September 10, 2006 Share Posted September 10, 2006 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! Link to comment https://forums.phpfreaks.com/topic/20284-how-to-include-eml-file/ Share on other sites More sharing options...
AndyB Posted September 10, 2006 Share Posted September 10, 2006 I assume you mean 'include' as an attachment to the email message ... Link to comment https://forums.phpfreaks.com/topic/20284-how-to-include-eml-file/#findComment-89311 Share on other sites More sharing options...
evon83 Posted September 10, 2006 Author Share Posted September 10, 2006 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?? Link to comment https://forums.phpfreaks.com/topic/20284-how-to-include-eml-file/#findComment-89313 Share on other sites More sharing options...
AndyB Posted September 10, 2006 Share Posted September 10, 2006 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 Link to comment https://forums.phpfreaks.com/topic/20284-how-to-include-eml-file/#findComment-89323 Share on other sites More sharing options...
evon83 Posted September 10, 2006 Author Share Posted September 10, 2006 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! Link to comment https://forums.phpfreaks.com/topic/20284-how-to-include-eml-file/#findComment-89333 Share on other sites More sharing options...
AndyB Posted September 10, 2006 Share Posted September 10, 2006 [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. Link to comment https://forums.phpfreaks.com/topic/20284-how-to-include-eml-file/#findComment-89337 Share on other sites More sharing options...
evon83 Posted September 10, 2006 Author Share Posted September 10, 2006 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.... Link to comment https://forums.phpfreaks.com/topic/20284-how-to-include-eml-file/#findComment-89346 Share on other sites More sharing options...
evon83 Posted September 10, 2006 Author Share Posted September 10, 2006 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.... Link to comment https://forums.phpfreaks.com/topic/20284-how-to-include-eml-file/#findComment-89349 Share on other sites More sharing options...
AndyB Posted September 10, 2006 Share Posted September 10, 2006 ... 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. Link to comment https://forums.phpfreaks.com/topic/20284-how-to-include-eml-file/#findComment-89352 Share on other sites More sharing options...
evon83 Posted September 10, 2006 Author Share Posted September 10, 2006 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... Link to comment https://forums.phpfreaks.com/topic/20284-how-to-include-eml-file/#findComment-89354 Share on other sites More sharing options...
evon83 Posted September 10, 2006 Author Share Posted September 10, 2006 but only send the template to one person at a time... not all at a time.. Link to comment https://forums.phpfreaks.com/topic/20284-how-to-include-eml-file/#findComment-89357 Share on other sites More sharing options...
AndyB Posted September 10, 2006 Share Posted September 10, 2006 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. Link to comment https://forums.phpfreaks.com/topic/20284-how-to-include-eml-file/#findComment-89360 Share on other sites More sharing options...
evon83 Posted September 10, 2006 Author Share Posted September 10, 2006 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?? Link to comment https://forums.phpfreaks.com/topic/20284-how-to-include-eml-file/#findComment-89365 Share on other sites More sharing options...
AndyB Posted September 10, 2006 Share Posted September 10, 2006 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] Link to comment https://forums.phpfreaks.com/topic/20284-how-to-include-eml-file/#findComment-89367 Share on other sites More sharing options...
evon83 Posted September 10, 2006 Author Share Posted September 10, 2006 ah??but my .eml file is a very long message??!!it includes all the instructions on how to participate and stuff??!!!! Link to comment https://forums.phpfreaks.com/topic/20284-how-to-include-eml-file/#findComment-89368 Share on other sites More sharing options...
evon83 Posted September 10, 2006 Author Share Posted September 10, 2006 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.. Link to comment https://forums.phpfreaks.com/topic/20284-how-to-include-eml-file/#findComment-89369 Share on other sites More sharing options...
AndyB Posted September 10, 2006 Share Posted September 10, 2006 [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. Link to comment https://forums.phpfreaks.com/topic/20284-how-to-include-eml-file/#findComment-89379 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.