-
☆ A M B ☆
- 455 Posts
Hi,
I need to send emails within a snippet, is it possible to use eform to send email? eform needs a form(needs &formId) and submit the form but i want to send specified email after something happens so i have no form(no fomId) to process.
if it’s possible, please tell me HOW and tell me what is better and simpler to use in snippets, EForm or phpmailer?
Thanks
AHHP
-
☆ A M B ☆
- 24,524 Posts
If you only need to send email but no form involved, then a snippet is good. eForm is just what its name indicates... for managing forms.
Here’s a handy page for using phpmailer.
http://phpmailer.codeworxtech.com/tutorial.html#2
Some other snippets already have built-in mailers; what exactly are you doing that will trigger the sending of mail?
-
☆ A M B ☆
- 24,524 Posts
A snippet to send mail isn’t difficult; the phpmailer tutorial I linked to shows you how to do that. The tricky part will be triggering the sending of the mail. Depending on what event triggers that, you may want to make a plugin. Plugins will activate on quite a number of events, from various stages of generating the web page to users logging in or logging out or registering. So you could have a plugin to send email every time someone looked at a specific page, or every time someone in the Manager edited a document.
-
☆ A M B ☆
- 24,524 Posts
I have a three-part tutorial on making a module on my site, but I’m not aware of any plugin tutorials. Mostly I just take one of the simple plugins and rearrange it to suit my purpose.
-
☆ A M B ☆
- 24,524 Posts
If I put everything I did in the Wiki then I wouldn’t have anything to put on my site (unless you’re interested in the side-to-side cowl neck sweater I’m crocheting out of a variegated earth-tones mohair blend yarn. That’s what happens when you have a geek granny

).
The links to my sites are in my sig; feel free to log in to my manager and poke around.