Submitter
SUPPORT TOPIC File Information
- Submitted: Dec 08 2008 01:19 PM
- Last Updated: Dec 08 2008 01:19 PM
- File Size: 2.19K
- Views: 2412
- Downloads: 399
Download emailSender
Snippet: emailSender
Author: Cris D
Date: 2008-12-08
Use: This is a generic snippet that allows you to easily add email capabilities to any other snippet, form or code.
Examples of implementation:
Using the runSnippet() API...
1) Collect the snippet parameters to pass to it.
example:
Note: When using any email scripts like this, make sure that they are protected from spammers by using a log-in script, captcha or other security code to protect it.
This was originally written to support the reportThisPage snippet.
Author: Cris D
Date: 2008-12-08
Use: This is a generic snippet that allows you to easily add email capabilities to any other snippet, form or code.
Examples of implementation:
Using the runSnippet() API...
1) Collect the snippet parameters to pass to it.
$params=array( 'flag'=>$flag, //leave blank or set to false to stop the email from sending. 'subject'=>$subject, //RFC2047 standard (see PHP.net function mail() for more) 'to'=>$to, //you guessed it, who to send the email- RFC2822 standard 'sender'=>$sender, //Who will be the sender. Leave blank to get the etomite site config email. 'headers'=>$headers)//Optional- MIME, Content type: text/html, etomite charset, and Return Path are sent by default.2) call the snippet into action using the runSnippet API
$var=$etomite->runSnippet('emailSender' $params);//returns true on success, false on failure and error if phpini mail is not set up.
3) Do something with the value returned from the snippet (true || false)example:
if($var) return "Email successfully sent!";Using a snippet call to set some variables:
[!emailSender?subject=MyPage!&to=someone@mysite.com!]
Note: When using any email scripts like this, make sure that they are protected from spammers by using a log-in script, captcha or other security code to protect it.
This was originally written to support the reportThisPage snippet.
- 248 Total Files
- 19 Total Categories
- 50 Total Authors
- 131,653 Total Downloads
- TripTracker Gallery Latest File
- Dean Latest Submitter











