ChronoEngine Forums
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Send Email via PHP + built-in method (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Send Email via PHP + built-in method
#5861
moontear (User)
Junior Boarder
Posts: 25
graphgraph
User Offline Click here to see the profile of this user
[SOLVED] Send Email via PHP + built-in method 4 Months, 2 Weeks ago Karma: 1  
Hello there,

I've seen several posts of people who use customized PHP code to send an e-mail, but I seem not to be able to find it anymore.

I use the built in "e-mail results" function to send me a status message with the field-names etc. I don't want users who register to receive that message and hence want to have a custom PHP mail sent to them. This will have a nicer layout and a thank you message etc.

All I need to know is how does a very simple e-mail in PHP+Joomla+Chronoforms look like and how do I call the chronoform field names (e.g. last_name, first_name).
The best would be if somebody would be able to produce the code for "Hello {first_name} {last_name}, thank you for registering".

Thx in advance,
dennis<br><br>Post edited by: moontear, at: 2008/02/19 18:37
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#5862
GreyHead (Admin)
Admin
Posts: 2801
graph
User Offline Click here to see the profile of this user
Re:Send Email via PHP + built-in method 4 Months, 2 Weeks ago Karma: 59  
Hi Dennis,

This request seems to be increasing so maybe Max will add it in to a future release. At the moment you have to do a workaround in the 'OnSubmit after email' box. Here's one that I did for a client this week:
Code:

&lt;?php $recipient = $_POST['email']; $subject = &quot;Medway Voice - thanks&quot;; $html_message = &quot;&lt;p&gt;Dear &quot;.$_POST['name'].&quot;,&lt;/p&gt; &lt;p&gt;Thank you for submitting the membership form.&lt;br /&gt;As soon as we process it you will receive your user name and password.&lt;/p&gt; &lt;p&gt;The XXX Team&lt;/p&gt;&quot;; mosMail($from, $fromname, $recipient, $subject, $html_message, true ); echo $html_message; ?&gt;
This version sends an email and - in the last 'echo' line also shows it on the ThankYou page. If you want to add field values then these can be put into the $html_message using the &quot;.$_POST['field_name'].&quot; format. Bob<br><br>Post edited by: GreyHead, at: 2008/02/19 12:08
 
Report to moderator   Logged Logged  
 
Bob Janes
info at greyhead.net
ChronoForms Support If you like ChronoForms please vote or post a review at Joomla.org
  The administrator has disabled public write access.
#5868
moontear (User)
Junior Boarder
Posts: 25
graphgraph
User Offline Click here to see the profile of this user
Re:Send Email via PHP + built-in method 4 Months, 2 Weeks ago Karma: 1  
Thank you Bob, helpful as always!
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#7659
Paiyili (User)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Re:Send Email via PHP + built-in method 2 Months, 2 Weeks ago Karma: 0  
GreyHead wrote:
QUOTE:
If you want to add field values then these can be put into the $html_message using the ".$_POST['field_name']." format.

Bob<br><br>Post edited by: GreyHead, at: 2008/02/19 12:08


Hi. Could you show me an example of this being done? Thanks.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#7662
moontear (User)
Junior Boarder
Posts: 25
graphgraph
User Offline Click here to see the profile of this user
Re:[SOLVED] Send Email via PHP + built-in method 2 Months, 2 Weeks ago Karma: 1  
sure will do, following the previous example:

Code:

&lt;?php $recipient = $_POST['email']; $subject = &quot;Our Newsletter - thanks&quot;; $html_message = &quot;&lt;p&gt;Dear &quot;.$_POST['name'].&quot;,&lt;/p&gt; &lt;p&gt;Thank you for submitting the membership form.&lt;br /&gt;As soon as we process it you will receive your user name and password.&lt;/p&gt; &lt;p&gt;Your username is:&quot;.$_POST['username_field'].&quot;&lt;/p&gt; &lt;p&gt;Your password is:&quot;.$_POST['password_field'].&quot;&lt;/p&gt; &lt;p&gt;The XXX Team&lt;/p&gt;&quot;; mosMail($from, $fromname, $recipient, $subject, $html_message, true ); echo $html_message; ?&gt;
The line &quot; &lt;p&gt;Your password is:&quot;.$_POST['username_field'].&quot;&lt;/p&gt;&quot; does output the value of the field with the name &quot;username_field&quot;. Just play around with it and your own field names / table column names. moon Post edited by: moontear, at: 2008/04/19 00:50<br><br>Post edited by: GreyHead, at: 2008/04/19 01:52
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop


equalheight If you have any questions you can post to our forums and we will be glad to help ASAP

Members Login






Lost Password?
No account yet? Register

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for
goods and services provided by ChronoEngine.com

ChronoForms License

equalheightTo be able to continue working at this component we decided to get a small profit out of it but at the same time don't force everybody to pay in order to use this great component.

 

 From version 1.5 and up a link at the bottom of everyform created will be placed, saying "joomla professional work", the link will be to us here htttp://www.chronoengine.com, its illegal to remove this link from the source code unless you have a license,

so the license is very simply for the same ChronoForms component without a link, thats all!

This License is for 5 different websites ONLY. 

 

 However, in order to allow everybody to still use the component and even get out of this, the link is inside a div with class : chronoform , use this to hide the link by using different colors or whatever if you really can't pay, but of course the link is still exists at your page source.

 

The license is ONLY 25$ can be bought here :

 

Thank you!

 

ChronoEngine.com Team 

Joomla Templates and Joomla Tutorials