This topic is locked
[SOLVED]

 Email event

3/12/2009 4:10:48 AM
PHPRunner General questions
M
monoofy author

Dears,
I want to use the send email event but I have a problem

I want this email to be sent to a crtain email and add another email in the CC

Also, I want this email to appear as sent from another email, meaning that I want to be able to set the from value.

How can I do that ?
BR,

Mahmoud

M
monoofy author 3/12/2009

Any help guys ??

Really appreciated

J
Jane 3/12/2009

Mahmoud,
I recommend you to check this article:

http://php.net/manual/en/function.mail.php
Use additional parameter in the mail() function to add CC and From email addresses.

M
monoofy author 3/22/2009

Dear Jane,
I really appreciate your help, I managed to do all this, works really perfect.

But I have another question. I have a field contains a file attached.

This file doesn't be attached in the email, how can I attach the file into the email ??
BR,

Mahmoud

M
monoofy author 3/23/2009

Any Help guys ??

M
monoofy author 3/23/2009

Really thanks for your reply.

I read teh 2 articls, but I'm a newbie, could you please give me an example of how to use this with PHPRunner events to read from attachment field ??
BR,

Mahmoud

Sergey Kornilov admin 3/23/2009

Mahmoud,
you can only attach a real, physical file. You cannot attach a BLOB field content.

M
monoofy author 3/24/2009

Mahmoud,

you can only attach a real, physical file. You cannot attach a BLOB field content.


Sorry for misunderstand, I have a field in the table that user attaches file to it.

I want after add record to send the attached file into the email.

How can I do this ??
BR,

Mahmoud

J
Jane 3/24/2009
M
monoofy author 3/25/2009

Mahmoud,

here is a sample code:

http://www.webcheatsheet.com/PHP/send_emai....php#attachment


Thanks Jane for your reply.

but, I saw this example before and I couldn't figure out how to define the variable for attachment as in this example the attachment is attachment.zip not a variable.

How can I do this?

J
Jane 3/25/2009

Here is a sample:

$attachment = chunk_split(base64_encode(file_get_contents($values["FieldName"])));



where FieldName is your actual field name.