Friday, March 19th, 2010 (updated 26 Jan ’12)

Documentation for Send Email v1.4

 

The Send Email plugin lets you send an email from within an ExpressionEngine template without the user submitting a form.

Compatibility

Compatible with both EE v1.x and v2.x.

Installation

EE v1.x

Place the pi.send_email.php file in the /plugins directory.

EE v2.x

Create in the /third_party directory a directory /send_email, then place the pi.send_email.php in there.

Required Parameters

to

This is the only required parameter, the email address that the email will go to.

Optional Parameters

from_email

The email address that will appear in the email’s From area. If using, also requires the from_name parameter.

from_name

The name address that will appear in the email’s From area. If using, also requires the from_email parameter.

subject

The email’s subject. If left empty, the default is “Email from [site_name]”.

mailtype

Either “html” or “plain”. Default is “plain”. Currently working in EE v2.x only.

parse

This parameter is available to all EE plugins. When set with a value of “inward” it allows the plugin to contain other plugins.

Variables

username, screen_name, member_id, email, ip_address

Example

{exp:send_email 
    from_name
="Joe Kissel" 
    
from_email="joe@kisselmail.org" 
    
to="mail@wackysillyhairpieces.net" 
    
subject="Hairpiece for Pico"
}
Dear Wacky Silly Hairpieces
,

Can you do something about {screen_name}s hairThough he does got to get back to work.

Thank you,

Joe Kissel
{
/exp:send_email} 

Thu 15 Apr ’10
1:21pm

Sophia Browne

Does this plugin allow dynamic variables?  I am trying to use {site_name} and {webmaster_email} and they are not being processed.

Thu 15 Apr ’10
2:54pm

Adam Khan

Sophia, try parse=“inward”. If that doesn’t work, I’ll have to work on it to get variables working.

Thu 15 Apr ’10
9:14pm

Sophia Browne

Hi, I tried the parse=inward and that didn’t work either.

Fri 16 Apr ’10
8:30pm

Adam Khan

Sophia, thanks for trying. I’ve added that to the plugin’s roadmap. Can’t say with confidence when exactly I’ll get to it though.

Fri 16 Apr ’10
11:14pm

Sophia Browne

Ok, that’s no problem.  I will just workaround it.

Thanks anyways.

Tue 20 Apr ’10
10:27pm

Kurt

I’m very interested in this. I’ve been asked to create a sort of tell-a-friend/e-card that self submits after a freeform is submitted. This might be a great way to make that happen.

Tue 4 May ’10
5:45pm

Nick Benson

I’m getting the following error on my EE 2 site, any thoughts?

————————-

A PHP Error was encountered

Severity: Notice

Message: Use of undefined constant PATH_CORE - assumed ‘PATH_CORE’

Filename: send_email/pi.send_email.php

Line Number: 74

Sun 11 Jul ’10
1:56am

jimboJ

Any news following on from Nick Benson’s comment above? Having the same issue…

Tue 10 Aug ’10
8:50pm

Kyle Batson

I have a request that allows using conditionals inside the message. I’m populating the message field with some custom fields, and if that custom field is not present, I don’t want it to show up. Something simple like {if custom_field}Content here{/if}

Also, might you know why having ‘http://’ in the message field outputs as encoded HTML character entities instead? Is there a way this can be switched from within the plugin?

Thanks.

Wed 25 Aug ’10
6:08am

Adam Khan

Sorry for not responding, people, I’ve been a bit swamped and haven’t had time to address issues on the free plugins.

Nick and JimboJ, I haven’t yet figured out why the PHP notice is happening, sorry!

Kyle, the encoding is happening within EE’s built-in functions that the plugin’s calling—I’ll have to look further to see how to disable that.

Wed 29 Sep ’10
2:42pm

Sophia Browne

Hi,

I added to the send email plugin since I had the same HTML character entities problem.
I added a function from the Regular expressions class to the -> $E->message($REGX->unhtmlentities($message));  Don’t forget to call the class -> global $REGX; // EEv1 syntax.

The unhtmlentities function takes a string and returns with all entities turned into their characters. http://expressionengine.com/legacy_docs/development/reference/regex.html

In a bit of a hurry, so I have to keep this short, hope this helps!

Mon 10 Jan ’11
12:38pm

Adam Khan

Sophie, it’s months later, my apologies for leaving you in the lurch there, presume you got it fixed!

Mon 10 Jan ’11
5:13pm

Sophia Pitt-Browne

Yes Adam, I did!

Thu 17 Mar ’11
6:51am

Stuart

Re: Use of undefined constant PATH_CORE

Looking at the file and the structure of 1.6 V 2.0.1 that the file it’s referencing “core.email” no longer exists in 2.1.X

No idea how to amend or what to amend to :(

Fri 22 Apr ’11
1:41pm

James

I’m getting the same PHP error as Nick, did anyone ever find a way round it?

Tue 24 May ’11
3:11pm

Jim

Any idea when yo might add the functionality for variables?

Tue 2 Aug ’11
3:34pm

Tiffany

I got this to work on EE 2.1.3 by replacing the send email code with this:

        // Send email
        $this->EE->load->library(‘email’);
        $this->EE->email->initialize();
        if ($from_email && $from_name)
        {
          $this->EE->email->from($from_email, $from_name);
        }
        else
        {
          $this->EE->email->from($PREFS->ini(‘webmaster_email’), $PREFS->ini(‘webmaster_name’));
        }
        $this->EE->email->to($to);
        if ($subject)
        {
          $this->EE->email->subject($subject);
        }
        else
        {
          $this->EE->email->subject( “Email from ” . $PREFS->ini(‘site_name’) );
        }
        $this->EE->email->message($message);
        $this->EE->email->Send();

Mon 23 Jan ’12
10:43pm

Adam Khan

Tiffany, a very belated thanks for fixing the plugin. Working for me on EE2. Not sure now though on EE1, will have to check.

Wed 7 Mar ’12
8:33pm

Toby Callinan

Just wondering…

Does this plugin work when it’s submit? It mentions that it works without submitting a form. Does that mean I can set up a cron job that will then just send an email?

I’m tring to find a method to send emails after a query I the DB that pulls out certain users - ths might be perfect!

Wed 7 Mar ’12
8:39pm

Adam Khan

Toby,

No form involved, just sends an email when the template containing the tag is loaded. Nice when loaded with ajax.

Tue 10 Apr ’12
3:32pm

Rob Stokes

If I understand correctly ... the from name, from email address, to email address and subject all have to be hard-coded into the template. It is not possible, for example, to look at a channel entry and pull out the details from there?

I was hoping to use this plug-in to send a “thank you” notification email to a user after they had filled in a form (with which I am using Safecracker to store the entered details in a channel) on the site. The “to” email address at the very least will be dynamic.

Can I not do this with this plug-in?

Tue 10 Apr ’12
3:42pm

Rob Stokes

Thought I’d better say ... I’ve tried putting the {exp:channel:entries} code directly within the send_email tag, as well as calling the result via a snippet and an embed, but none worked. Works fine when I hard-code the details.

Fri 11 May ’12
3:22pm

Michael Rog

Rob, try wrapping the Send_email plugin INSIDE of the Channel:Entries tag, and use parse=“inward” on the outer tag. Then you can use the email address variables from your entries as the parameters of Send_email.

Thu 21 Jun ’12
5:47pm

Laurence Cope

This is a great little plugin. I am combining it with EEI_TCPDF to generate a PDF from a template then saves it, and uses Send Email to attach and email it.

So I have modified your file to add attach, I think you should update it, its very useful…


$attachment = $TMPL->fetch_param(‘attachment’);
       
// Attach attachment
if($attachment != ‘’)
{
  $this->EE->email->attach($attachment);
}

Fri 22 Jun ’12
12:52pm

Adam Khan

Thanks Laurence, will add that in for next release!

Fri 28 Sep ’12
4:30am

Craig Allen

I’ve tried it with mailtype=“html”, but all the html is being displayed in email clients. What might be the cause of this? I’m using EE 2.5.2

Thu 26 Jun ’14
3:31pm

Jamie Blacker

It says that the mailtype parameter was added in 2010, but it doesn’t seem to be in V1.4.
To add it in:
$mailtype = $TMPL->fetch_param(‘mailtype’);
if ($mailtype == “html”)
{
$this->EE->email->mailtype = ‘html’;
}

Mon 26 Nov ’18
2:55pm

John

Thank you for this information. I really appreciate you sharing all of these. concrete contractors tuscaloosa al

Sat 22 Dec ’18
5:37am

Softech

Wonderful presentation.This presentation help to gather more information.
Thank You for sharing.

Sat 22 Dec ’18
5:55am

Michel Foster

Wonderful presentation grate article which is help to gather more information.
Thank You for sharing.

Fri 28 Dec ’18
3:22am

Jonathon Coleman

Awesome information I am reading here.
Jon of columbia heating and cooling

Sat 12 Jan ’19
2:31am

Na ta

Thank you for sharing this exciting resource with me and the world. Wish you always luck.
Douchebag Workout

Mon 21 Jan ’19
8:19am

Alex Jacob

Thank you for that PlugIn
Check out deer hunting games free.

Fri 15 Feb ’19
8:00am

ariana

Your blog is really interesting and inspiration to many. I’ll be looking forward for more of your post. FNAF World

Sun 3 Mar ’19
7:37am

Jean

Need to use this plugin to let me know about the now concrete driveway Sacramento. Customers have to hear about us!

Tue 5 Mar ’19
7:37pm

Tom Faris

Thanks a lot for the plugIn. Very useful.
Aurora tree trimming service

Thu 7 Mar ’19
7:48pm

Jim Johnson

Very useful plugin I’ve used for email on a number of my sites.
tree service Little Rock

Mon 22 Apr ’19
7:39pm

Michael Ward

Thanks for sharing this plugin!
cbd for pain”>

Mon 22 Apr ’19
7:41pm

Jonathan Burke

cbd for pain

Wed 8 May ’19
5:32pm

Jake Smith

This will be super helpful for my windshield repair davenport team. Thanks!

Wed 8 May ’19
8:01pm

Sam Brender

This is perfect for my website! Thanks for sharing :)
www.mobile-autoelectrical.com

Tue 4 Jun ’19
3:17pm

Camille

I will definitely try this one and if it works, this would be a great help! Thank you for this one.

Tue 4 Jun ’19
3:19pm

Trishang

I will definitely try this one and if it works, this would be a great help! Thank you for this one.
Camille for https://www.homestagingtampabay.com/

Tue 4 Jun ’19
3:48pm

Daniel

I’ll try this one because I think it works. Thanks for sharing, Keep it up!
Commercial Roofing Cincinnati Ohio

Fri 21 Jun ’19
8:16am

Meggy

I want to try this, Hopefully it will work! Thanks.
Amazing

Tue 9 Jul ’19
12:12am

Carl Max

Sending emails to trustworthy businesses is a great way to get your foot in the door as a new employee. That’s how I started doing mobile car wash services for Auto Detailing Victoria and I always recommend email instead of social media for networking.

Wed 7 Aug ’19
4:53am

Joseph

Excellent information that I will add to my website - www.treeservicevaughan.com

Thu 15 Aug ’19
7:43am

Piper

I have learned something today! Thank you so much for this information.
For <a >arborist bellevue</a>

Thu 15 Aug ’19
7:45am

Piper

I have learned something today! Thank you so much for this information.

arborist bellevue

Mon 19 Aug ’19
2:57pm

John1999

Nice feature! home automation London
home automation Manchester

Wed 11 Sep ’19
7:30pm

Jeff Thomas

Great little plugin!
Cincinnati fence companies
Tulsa fence companies
Fence companies Rochester NY

Fri 20 Sep ’19
11:56pm

tom keen

more information

Tue 1 Oct ’19
2:55am

Filmee Keeda

korean thriller movies

Tue 1 Oct ’19
2:57am

Filmee Keeda

korean thriller movies

Tue 1 Oct ’19
4:38pm

Guillaume

Professional Painters Ann Arbor

Tue 1 Oct ’19
4:39pm

Frenchy Agent

Detroit real estate agent

Fri 11 Oct ’19
12:35pm

Elaine Travis

Very engaging https://www.manchesterstreesurgeon.co.uk

Wed 16 Oct ’19
3:28pm

Shain

I am very happy to be engaged to my fiance. https://www.manchestergardenservices.co.uk

Sat 9 Nov ’19
6:38pm

John Mills

Thank you for the free plugin, iv been looking for something like this for a while.

Sat 9 Nov ’19
6:40pm

Travis Jones

This is the perfect plugin that I need! Thanks!
https://www.bellevuetreeservice.org/

Wed 13 Nov ’19
1:09am

Roger

Great plugin!! Thanks!
https://www.fairfieldelectrical.com.au

Thu 21 Nov ’19
2:03am

Leo

I like these new features. great plugin
fencing pensacola
fencing lexington ky
fence company miami fl
fencing redding ca 

 

Mon 25 Nov ’19
11:14pm

Roland T

This is great! I can use this for my business now!! Thank you!

https://www.seattle-asbestosremoval.com/
https://www.videographer-seattle.com/

Tue 26 Nov ’19
12:02am

Emma Smith

Very engaging stuff. Thank you for the information.
commercial snow plowing Rochester NY_
street plowing Syracuse

Tue 26 Nov ’19
4:03pm

Patrice O'Hara

Truly awesome! Appreciate it!
Container Rental

Mon 9 Dec ’19
3:02pm

Tree Removing

Pretty cool post. Lots of good information.

Tree Removing

Sat 14 Dec ’19
1:02am

Salah Khan

Great information, thanks!!
https://www.aaashorelineroofing.com/

Sat 14 Dec ’19
1:56am

Samir Ginjin

Awesome! Thank You!
Carpenter Seattle

Mon 16 Dec ’19
8:27am

John Phillips

I tired the plugin and it worked! Thank You!

Shoreline Roof Repair

Sun 22 Dec ’19
8:48pm

Terry Crews

The plugin was a great addition, thanks for making it! No form needed for submission!

Mold Removal Morristown
Lawn Mowing Fishers
Mold Removal Montville
Mold Removal Newark
Home Inspector
Seattle Mold

Wed 25 Dec ’19
11:48am

farazkhan2202

Take a look at this
mesatrees.com

Wed 25 Dec ’19
11:51am

farazkhan2202

I tired the plugin and it worked! Thank You! www.pickituptowing.com/

Wed 25 Dec ’19
11:56am

farazkhan2202

This a really great post sir. affordable tree removal

Wed 25 Dec ’19
11:56am

farazkhan2202

Wow sir! What a nice post. affordable appliance repair

Wed 25 Dec ’19
12:03pm

farazkhan2202

Zabardast stuff bro. I totally liked it sir

http://reclaimucounseling.com/

Wed 25 Dec ’19
12:03pm

farazkhan2202

Brilliant work dude. I am totally in love with your work.
treeworksaz.com/

Wed 25 Dec ’19
12:03pm

farazkhan2202

This is my favorite free plugin. Totally in love with it.

Buy Felisha for Gilbert AZ homes for sale

Wed 25 Dec ’19
1:30pm

Wuju KBBQ

The plugin worked great! Thank You

http://www.wuju-kbbq.com/

Tue 31 Dec ’19
6:40pm

osama shk

I like this post,And I guess that they having fun to read this post,they shall take a good site to make a information,thanks for sharing it to me.
banderas institucionales

Tue 7 Jan ’20
3:42am

Mazikeen

Thank you for this privilege, man!

Gardeners Newcastle
Carpet Steaming Townsville

Wed 8 Jan ’20
1:48am

Gerald

I love how this is free! Thank you!
website
arborist Webster Groves

Wed 8 Jan ’20
1:57am

Pam

yup yup
garbage container_

Fri 10 Jan ’20
10:03am

Brenda Mage

This is a great little plugin. I am combining it with EEI_TCPDF to generate a PDF from a template then saves it, and uses Send Email to attach and email it.

So I have modified your file to add attach, I think you should update it, its very useful…workspace newcastle

$attachment = $TMPL->fetch_param(‘attachment’);

Sat 11 Jan ’20
6:57am

Jacob

Thank you for this plugin makes my life so much easier when managing emails.

Jacob - Manager
www.scarboroughtreecare.com

Mon 13 Jan ’20
1:28am

Morgan

I really appreciate it!  We can help you in window cleaning House Cleaners Newcastle nsw

Mon 13 Jan ’20
1:37am

Elmer

We from Central Coast Yard Maintenance  is very grateful for this site!

Tue 14 Jan ’20
9:51am

John

Thank you so much for sharing this! Adelaide Concrete Company

Tue 14 Jan ’20
10:14am

wendy

This is awesome! Great writing! Cleaning Service

Sat 18 Jan ’20
3:45pm

osama shk

Thanks for the post and great tips..even I also think that hard work is the most important aspect of getting success..
vietnam halong bay tour

Tue 21 Jan ’20
3:40am

tiffany

Great product, thanks! -Tiffany https://www.carpetcleaningnaplesfl.com

Wed 22 Jan ’20
1:05pm

Llorein

Amazingg!!
<a >biohazard cleaning</a>
<a >bridal makeup gold coast</a>
<a >wollongong garbage collection</a>
<a >mobile makeup artist gold coast</a>
<a >garden design newcastle</a>
<a >garden design port macquaire</a>
<a >dusting newcastle</a>
<a >dusting coffs harbour</a>
<a >commercial painting coffs harbour</a>

Thu 23 Jan ’20
6:42pm

osama shk

I am glad you take pride in what you write.  This makes you stand way out from many other writers that push poorly written content.
https://www.topspeed.in

Sun 26 Jan ’20
10:18am

osama shk

I like this post,And I guess that they having fun to read this post,they shall take a good site to make a information,thanks for sharing it to me.
Digital Marketing Gold Coast

Mon 27 Jan ’20
9:34am

Grand Cleaning Solutions

I Really Love this post, Thank you for sharing…
commercial cleaner central coast

Tue 28 Jan ’20
9:05am

Mikel

I never thought that sending emails could be possible without using any browser or email client. Good job!

https://westminsterlandscapingservice.com

Wed 29 Jan ’20
5:43am

Sivart

Interesting plug in. Thanks for sharing.

junk removal fresno
fresno event venues
appliance repair modesto
appliance repair stockton

Wed 29 Jan ’20
10:33am

Littleton Fence and Deck

I’m not sure if someone still use this free plugin. Anyone? Anyway, thanks for sharing - https://littletonfenceanddeck.com/

Thu 30 Jan ’20
6:18am

Ian Pundt

Want the best care for your trees and property? Then we are the tree service to call now. We are the Sioux City tree service with the best range of reliable tree care and related tree services. We are the “tree service near me” to call when you need any tree care services, tree removal or any other tree related services. Call us now to see the full range of services that we can provide your trees and property.

www.siouxcitytree.com

Fri 31 Jan ’20
9:47am

Andy Davidson

Great Plugin!

Top Rated Fencing experts in McAllen, Texas. Custom built and made to last a lifetime - https://mcallenfencing.com/

Mon 3 Feb ’20
2:15am

Upholstery Fresno

Really interesting article. Thank you for sharing!

Mon 3 Feb ’20
2:17am

Upholstery Fresno

Really interesting article. We loved reading it here at <a >upholstery fresno</a> Thank you for sharing!

Mon 3 Feb ’20
7:26am

Adam

Great information. Anyway, does anyone know what plugin is better to use in sending / outgoing emails if you have the latest version of express engine platform? Need to help a friend.

On the other hand, for the highest quality Deck and Fence Installation services at affordable rates in Brighton, Colorado opt for Brightondeckandfence.com/.

Wed 5 Feb ’20
7:05am

Danrie

This plug-in is amazing! Thank you for sharing. If you need deck contractors, please visit https://www.fortcollinsdeckbuilder.com

Thu 6 Feb ’20
2:38pm

Read more

Thank you for this wonderful article. You want to get some ideas about us? Read More

Sat 8 Feb ’20
7:08am

Glenn123

Thank you for making this plug-in free for everyone to download. I appreciate it so much. This is great and I admire you for sharing.

Contact us for shrub & hedge trimming in Fort Collins

Sat 8 Feb ’20
7:17am

Robert189

The free plug-in is amazing. Thank you for posting this. You are a lifesaver. Good job and keep going.

Visit us for concrete foundation work

Mon 10 Feb ’20
11:25am

Mike

I’ll try to check if this still works. Thanks for sharing the free plugin. Also, visit us for shrub & hedge trimming services in Wichita Falls TX.

Mon 10 Feb ’20
2:14pm

Mike

Great article! Thank you so much for sharing!

Mon 10 Feb ’20
2:16pm

Michael

Really interesting article! I’m going to try this -Also, I’m in the handyman business if anyone is interested:  http://www.handymanoxnard.com

Tue 11 Feb ’20
9:44am

Daniel

Thanks for sharing and having this plugin readily available for download. Anyway, is there by any chance a post here about a tutorial on how to install this plugin?

Also, visit this website in case you need someone to take care your residential and commercial flooring needs in Aurora CO or nearby.

Wed 12 Feb ’20
7:43am

Ian Pundt

Great information. Anyway, does anyone know what plugin is better to use in sending / outgoing emails if you have the latest version of express engine platform? Need to help a friend.

bathroom remodeling contractors

Wed 12 Feb ’20
11:08am

Roque

I am happy that there is now a free plug-in that allows us to send an email with the platform without submitting any form. It just saves us a lot of time and effort. Thank you for sharing this release.

If you need any stump grinding services, please Click Here

Thu 13 Feb ’20
6:36am

Caroline Herzog

Sophia, thanks for trying. I’ve added that to the plugin’s roadmap. Can’t say with confidence when exactly I’ll get to it though.

Website

Thu 13 Feb ’20
8:49am

Ian Pundt

I’m very interested in this. I’ve been asked to create a sort of tell-a-friend/e-card that self submits after a freeform is submitted. This might be a great way to make that happen.

Window Cleaning Rapid City

Fri 14 Feb ’20
4:11am

Eric Myers

Thank you so much for this helpful article! Our business, Electrician Adelaide can definitely reap benefits from this! :)

Fri 14 Feb ’20
9:20am

Daniela

hmm. is this still working? Anyone who have tried using the plugin lately. Hope to get answers before I’ll try this on my end.

Daniela
https://mckinneytxstumpgrinding.com/ -  Landscaping Company

Fri 14 Feb ’20
9:37am

Adam

This could possibly be a good plugin that I will surely recommend to a deck design company I know in Allen Texas. Interested about such company? Find out more

Mon 17 Feb ’20
2:01am

www.nephiladelphiatowing.com

Very nice Article! Great Job!

Mon 17 Feb ’20
2:07am

GiannisAntetokounmpo34

Very nice article! Nice work! By the way, looking for Basement Developments?

Mon 17 Feb ’20
2:14am

NikolaJokic15

The product is very helpful! Hoping to help more from their Outdoor Grasses Problem. <a >Tree Trimming</a> and bush cutting.

Mon 17 Feb ’20
2:16am

NikolaJokic15

The product is very helpful! Hoping to help more from their Outdoor Grasses Problem. <a >Tree Trimming</a> and bush cutting.

Tue 18 Feb ’20
6:05am

Mr.Bean

Having this kind of information is very helpful! Very good job! By the way, having a trusted <a >Cheap towing</a> company is very helpful specially in auto moving industries.

Thu 20 Feb ’20
2:38pm

SantanaBritt

Thank you for sharing the free plug-in! It is performing excellently! Kudos to the developers and authors. Please continue to rise in your endeavors.

Cheers from Broomfield commercial landscape service

Sat 22 Feb ’20
2:10pm

John Smith

Appreciate the plugin for the ExpressionEngine template…

John | FCW Website

Sun 23 Feb ’20
5:48am

Cody

Thank you for clarification. Codes actually solve my issue with the plug in. mexican food catering

Sun 23 Feb ’20
9:57pm

Nat Mason

We here at conway remodeling contractor Always try to take great care of our customers. Keep up the great posts! Always enjoy reading about how to better our company.

Sun 23 Feb ’20
11:07pm

Mason Stone

This information is very helpful. Keep up the great work.
Cheers Concord Masonry

Post a comment

Name:

Email:

Location:

URL:

Your comment:

Please answer the following question to assure your intentions are honorable: Name a movie that's set "A long time ago in a galaxy far away..." (9 characters required)

Remember my personal information
Notify me of follow-up comments?