I crack Photoshop!
Posts: 3
22 credits Members referred : 0
« on: Aug 06, 2007, 02:50:42 AM »
Hi, A very nice class you guy`s/girls created with some nice examples, i got it up and running within seconds. i have one question, hoe can i get variables in the mail? I explain:
I use a form on my website that people fill in. Name address etc. when they submit a mail is send to them and also to me, both with attachments. The data that the user provided in the form is gone then, so i only have their emailaddress. If this is possible to add one way or the other would you be so kind to explain how and if possible provide in your answer a small example. I use the HTM version so my guess is that i have to add something here:
I crack Photoshop!
Posts: 3
22 credits Members referred : 0
« Reply #2 on: Aug 06, 2007, 11:57:31 AM »
Olaf,
Thanks for the quick reply. I tried to add your code to my test setup but i cannot get it to work. In the HTML email shows the code {company} thats how i added it to the html_attachment.htm (as used in the example) The code for the tags you provided i put after. $test->add_attach_file("ip2nation.zip"); $tags['company_name'] = $_POST['company']; $tags['from_country'] = $_POST['country']; $test->html_body = file_get_contents("html_attachment.htm"); foreach ($tags as $tag => $val) { $tpl_str = str_replace("{".$tag."}", $val, $tpl_str); }"
Could you please advice and or be more specific on how to use. Sorry for the trouble. Ces
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6440
39464 credits Members referred : 374
I crack Photoshop!
Posts: 3
22 credits Members referred : 0
« Reply #4 on: Aug 06, 2007, 12:28:51 PM »
Olaf, thanks again, Unfortunately i dont get it to work. My knowlidge about this is way to limited. I tried several things to add your code but none seem to work. Not your fold, it is me being to new to this stuff to understand. I will use the txt mail example. That seems to work for me. Thanks for your help. Ces
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6440
39464 credits Members referred : 374
It's time to use PHP5!
« Reply #5 on: Aug 06, 2007, 01:53:02 PM »
yes that better, if you don't know how to use it, it's better to try something more simple