IPB

Welcome Guest ( Log In | Register )



Tags
This content has not been tagged yet
4 Pages V  < 1 2 3 4 >  
Reply to this topicStart new topic

Email Script/form With Php

, how to make a simple email script using php

snlildude87
no avatar
Moderator
***************
Group: Members
Posts: 2,325
Joined: 8-March 05
From: Mawson, Antarctica
Member No.: 4,254



Post #11 post Apr 23 2005, 12:06 AM
QUOTE(hype @ Apr 20 2005, 04:35 AM)
I believe you have to replace this as well
CODE
mail('snlildude87@gmail.com', 'Someone Sent You Something!!!', $content);


to

CODE
mail('youremail@yourdomain.com', 'Someone Sent You Something!!!', $content);

[right][snapback]131780[/snapback][/right]
Right, I stated that in my first post:
QUOTE(snlildude87 @ Apr 18 2005, 11:27 PM)
CODE

...
  mail('snlildude87@gmail.com', 'Someone Sent You Something!!!', $content); //first argument = your email address; second argument = subject of email (make it very catchy so you won't miss it); third argument = the content (DO NOT CHANGE THIS!!)
...

[right][snapback]131276[/snapback][/right]


Thanks for noticing. smile.gif
Go to the top of the page
+Quote Post
Amezis
no avatar
Privileged Member
*********
Group: Members
Posts: 535
Joined: 14-February 05
From: Oslo, Norway
Member No.: 3,759



Post #12 post May 12 2005, 02:41 PM
Most usefull tutorial I have seen the web biggrin.gif
Go to the top of the page
+Quote Post
snlildude87
no avatar
Moderator
***************
Group: Members
Posts: 2,325
Joined: 8-March 05
From: Mawson, Antarctica
Member No.: 4,254



Post #13 post Jun 12 2005, 03:11 AM
QUOTE(Carsten @ Apr 19 2005, 09:00 AM)
Unfortunately you might need to include more headers other then the From header if you want to send e-mail to big free e-mail providers like Hotmail. The mail() function has the syntax of mail($to, $subject, $content, $headers). To add some more required headers, just add a comma after $content and add a variable $headers. Then, fill the variable $headers with something like this:
CODE
$headers = "MIME-Version: 1.0\n"; // don't change
$headers .= "Content-type: text/html; charset=iso-8859-1\n"; // don't change
$headers .= "X-Priority: 1\n"; // don't change
$headers .= "X-MSMail-Priority: High\n"; // don't change
$headers .= "X-Mailer: php\n"; // change php in what you like
$headers .= "From: \"" . $from . "\" <" . $email . ">\n";
$headers .= "Reply-To: \"". $from ."\" <". $email .">\n";
Now you don't even have to copy/paste the users e-mail adress, you can directly click reply and send them an e-mail.

To make it clear, replace
CODE
mail('snlildude87@gmail.com', 'Someone Sent You Something!!!', $content);
with
CODE
mail('snlildude87@gmail.com', 'Someone Sent You Something!!!', $content, $headers);
and put all the $headers in front of that.
[right][snapback]131429[/snapback][/right]
Woohoo! It works now! I don't have to copy and paste their email address anymore! Thanks man. smile.gif


QUOTE(Amezis @ May 12 2005, 11:41 AM)
Most usefull tutorial I have seen the web biggrin.gif
[right][snapback]140635[/snapback][/right]
Hey, no problem. Let me know if you used it on my site. I'm curios to see if/what changes you made to it. smile.gif
Go to the top of the page
+Quote Post
badinfluence
no avatar
Super Member
*********
Group: Members
Posts: 283
Joined: 10-October 04
Member No.: 1,637



Post #14 post Jun 13 2005, 04:42 PM
hi folks,
thks for the tutorial.. base on this.. i scripted my contact page successfully. here is a working script in action..

i just modified to limit the valid e-mail mandatory* for contact/query to webmaster and auto redirect upon process.. and i splited to form query page for contact.php and mailto for processing the query. i will add autorespond upon successful mail delivery back to visitor and phpBB forum registered users may not need to supplied e-mail(just registered username can allow to query)..

pls test it out and if you want code, pls post here

thks for all, folks

smile.gif
Go to the top of the page
+Quote Post
FaLgoR
no avatar
Super Member
*********
Group: Members
Posts: 217
Joined: 2-January 05
Member No.: 3,084



Post #15 post Jun 13 2005, 04:48 PM
QUOTE
Most usefull tutorial I have seen the web


The forum is loaded with these kind of script.... really loaded o.O
Go to the top of the page
+Quote Post
snlildude87
no avatar
Moderator
***************
Group: Members
Posts: 2,325
Joined: 8-March 05
From: Mawson, Antarctica
Member No.: 4,254



Post #16 post Jun 13 2005, 05:39 PM
QUOTE(FaLgoR @ Jun 13 2005, 01:48 PM)
The forum is loaded with these kind of script.... really loaded o.O
[right][snapback]150653[/snapback][/right]
Really?? I thought this mail tutorial thing is the first on trap17. sad.gif Can you give me 2 or 3 mail scripts that people have submitted in the past?
Go to the top of the page
+Quote Post
Lozbo
no avatar
Super Member
*********
Group: Members
Posts: 282
Joined: 1-September 05
From: Wanatos
Member No.: 11,382



Post #17 post Nov 23 2005, 01:35 AM
QUOTE(Newton @ Apr 19 2005, 01:34 PM)
I'd just like to add that mail headers should use \r\n line breaks, as per RFC 2822 section 2.1.

Also if you want something more 'complicated', use PHPMailer.
[right][snapback]131564[/snapback][/right]

So instead of
CODE

$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";


We should use
CODE

$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";  


???

And what php mailer?

[note=jlhaslip]edit to include code tags[/note]

This post has been edited by jlhaslip: Nov 23 2005, 01:49 AM
Go to the top of the page
+Quote Post
puffy
no avatar
Member [Level 1]
****
Group: Members
Posts: 63
Joined: 10-February 06
Member No.: 18,480



Post #18 post Feb 11 2006, 10:14 AM
Wow man great thx for giving me this script i was really searching for this script from so many days. I had searched google, yahoo etc... but none of them worked. But i found one in google but that script used to send the mail from contact form after few hours or so...... Those scripts lack, but urs is good script man. Please kepp posting the scripts for many programs and also i want the script for posting a google adsense banner on my forums pages, if you know the script please kindly let me know about this to me as soon as possible.
Go to the top of the page
+Quote Post
technocrat
no avatar
Newbie [Level 2]
**
Group: Members
Posts: 26
Joined: 5-February 06
Member No.: 18,245



Post #19 post Feb 11 2006, 12:28 PM
so , does taht mean the HEADERS of the main() function are OPTIONAL ?
also , can i have the details of the headers please ?
Go to the top of the page
+Quote Post
antony2kx
no avatar
Newbie [Level 2]
**
Group: Members
Posts: 35
Joined: 13-February 06
Member No.: 18,583



Post #20 post Feb 17 2006, 05:03 PM
does any one know of a good php wap forum that i can use. because i need one badly, please if any one know of any script like this please reply.
Go to the top of the page
+Quote Post

4 Pages V  < 1 2 3 4 >
Reply to this topicStart new topic

Collapse

> Similar Topics

    Topic Title Replies Topic Starter Views Last Action
No New Posts   5 Shibbeh 450 20th August 2004 - 10:04 PM
Last post by: ill
No new 18 EricDrinkard 1,234 28th August 2004 - 09:49 AM
Last post by: NuHoaXuLa
No New Posts   6 LuciferStar 609 7th November 2004 - 12:40 PM
Last post by: eldeo
No New Posts   4 shadowx 1,013 23rd August 2007 - 08:23 PM
Last post by: shadowx
No New Posts   10 ill 909 19th August 2004 - 01:29 PM
Last post by: odomike
No New Posts   4 xmae 705 24th August 2006 - 03:21 PM
Last post by: juice
No New Posts   0 kudmus 62 15th November 2008 - 05:39 PM
Last post by: kudmus
No New Posts   7 football123213 303 20th August 2004 - 12:25 AM
Last post by: ill
No new   15 -prodigy- 1,700 27th February 2005 - 10:22 PM
Last post by: alexia
No New Posts   2 -Pandemonium- 680 22nd August 2004 - 04:25 AM
Last post by: -Pandemonium-
No New Posts   8 -Pandemonium- 498 25th August 2004 - 04:00 PM
Last post by: -Pandemonium-
No New Posts   0 Raptrex 1,032 6th September 2004 - 11:19 PM
Last post by: Raptrex
No New Posts   11 dozen 910 13th September 2004 - 07:26 PM
Last post by: melkonianarg
No New Posts   3 keego 359 6th June 2008 - 10:17 AM
Last post by: varalu
No new