gproulx
Posts: 68
|
| Posted: 10/05/2007, 12:18 PM |
|
hi,
I have a page who send a email after a client have filled a form and checked the checkboxes corresponding to documents he want to receive. I just don't know how to pass the values in the email.
Example of the email received:
Name: xxx
Company: xxx
Country: xxxx
Email:xxx@xxx.com
Phone: xxx-xxx-xxxx
Documents needed: doc1, doc2, doc3, doc10
But, before the client fill the form, the documents he can check are previously filtered from a product category he selected from a listbox. For each products category, there is documents attached to them from another table. After the client select a product category, only the documents related to it appears. I add a checkbox control before the label containing the Document title. I don't know if it's the right thing to do cause i really don't know how to retrieve the value of the documents title that are checked.
Any help will be appreciated. I hope my explanations are clear! 
|
 |
 |
Waspman
Posts: 948
|
| Posted: 10/06/2007, 10:28 AM |
|
I do this a lot when send HTML emails with lots of info.
I assign the contents of my email to a variable then assign it to the message part of my email send script, like this;
global $emailBody;
$emailBody = "";
$emailBody = $emailBody."A quote has been submitted for your job/project -- ".$Component->JobTitle->GetText()." --";
$emailBody = $emailBody."To see the details of the quote logon to the site.";
$emailBody = $emailBody."<br><br>";
$emailBody = $emailBody."<a href=".$Component->url->GetText().">Click here to go to the site</a>";
$to = $Component->OwnerEmail->GetText();
$subject = "Quote submitted for job/project -- ".$Component->JobTitle->GetText();
$message = $emailBody;
$from = "TheTeam@SiteName.com";
$additional_headers = "From: $from\nReply-To: $from\nContent-Type: text/html";
mail ($to, $subject, $message, $additional_headers);
Hope this helps...
Tony
_________________
http://www.waspmedia.co.uk |
 |
 |
gproulx
Posts: 68
|
| Posted: 10/09/2007, 8:49 AM |
|
Thanks for answering Waspman,
but i already did what you said in your answer. My problem are to send values of the checkboxes. They are dynamic and i only want in the email the name of the documents that are checked from the client.
any suggestions?
Thanks in advance
|
 |
 |
wkempees
|
| Posted: 10/09/2007, 3:39 PM |
|
Use Waspman;s example, it is good.
You only need to contsruct your variable using a conditional
testing for the checked or unchecked state of the checkbox.
"gproulx" <gproulx@forum.codecharge> schreef in bericht
news:5470ba324ad893@news.codecharge.com...
> Thanks for answering Waspman,
>
> but i already did what you said in your answer. My problem are to send
> values
> of the checkboxes. They are dynamic and i only want in the email the name
> of the
> documents that are checked from the client.
>
> any suggestions?
> Thanks in advance 
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.yessoftware.com/
>
|
|
|
 |
|