Re: [PHP] HELP with mail()
On 4/6/07, Zhimmy Kanata <[EMAIL PROTECTED]> wrote: I created the following email program from a email function that I know works in another program. When I create a simple form page listed below and submit it. It echos the $email and the $username and it writes it to the page. So it is finding the variables within the transfering url in the form of a post. It doesn't give me an error message but I don't get an email? Should the Linux server not be executing the mail() function? What the beep!??? Again thanks in advance for any help. Zhimmy "; $mailSubject = "Your registration confirmation..."; $mailBody = "Dear $name,\n\nYour details have been added to my email list.\n\n To unsubscribe click on the link below\nhttp://www.sitename.com/mail.php?action=unsubscribe&email=$email";; mail($email, "Registration Confirmation", $mailBody, "From: \r\n" ."Reply-To: \r\n" ."X-Mailer: PHP/" . phpversion()); } ?> Try hardcoding the email, i've seen this problem more on this list.Try the code below and see if it solves your problem. Tijnema "; $mailSubject = "Your registration confirmation..."; $mailBody = "Dear $name,\n\nYour details have been added to my email list.\n\n To unsubscribe click on the link below\nhttp://www.sitename.com/mail.php?action=unsubscribe&email=$email";; mail("[EMAIL PROTECTED]", "Registration Confirmation", $mailBody, "From: \r\n" ."Reply-To: \r\n" ."X-Mailer: PHP/" . phpversion()); } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HELP with mail()
I created the following email program from a email function that I know works in another program. When I create a simple form page listed below and submit it. It echos the $email and the $username and it writes it to the page. So it is finding the variables within the transfering url in the form of a post. It doesn't give me an error message but I don't get an email? Should the Linux server not be executing the mail() function? What the beep!??? Again thanks in advance for any help. Zhimmy "; $mailSubject = "Your registration confirmation..."; $mailBody = "Dear $name,\n\nYour details have been added to my email list.\n\n To unsubscribe click on the link below\nhttp://www.sitename.com/mail.php?action=unsubscribe&email=$email";; mail($email, "Registration Confirmation", $mailBody, "From: \r\n" ."Reply-To: \r\n" ."X-Mailer: PHP/" . phpversion()); } ?> Form: Username: Email: Password: - All new Yahoo! Mail - Get news delivered. Enjoy RSS feeds right on your Mail page.
Re: [PHP] Help with mail() function
Pooya Eslami wrote: Hi, I'm new to php and this newsletter. I have a form on my webpage and a php file to email it to me but the contents of the text area are not emailed to me. Can anyone help me with this? here is the code for my html and php files: Test Comments: $message=$_POST[TextArea]; mail($to, $subject, $message,"From: $from"); echo "Thankyou"; } ?> A better way (imo) is to do it as javascript and pop up a window with the message. No server-side processing is then needed until a successful message is submitted. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Help with mail() function
Well the problem is not that it won't get executed, its that every thing will be sent except the message in the textarea! subject, to and from are sent fine -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Help with mail() function
did you replace ($TextArea="") with ($TextArea=="") ? ($TextArea="") will reassign $TextArea to "" >>> "Pooya Eslami" <[EMAIL PROTECTED]> 2/2/2004 3:00:32 PM >>> Well the problem is not that it won't get executed, its that every thing will be sent except the message in the textarea! subject, to and from are sent fine -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help with mail() function
ahh, I have to correct myself replace this: if ($_POST['TextArea']="") { with this: if ($_POST['TextArea']=="") { -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help with mail() function
[snip] [/snip] What is happening when the form is posted? This is just a guess, but I think registar_globals is probaby off. try this -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help with mail() function
Hi, I'm new to php and this newsletter. I have a form on my webpage and a php file to email it to me but the contents of the text area are not emailed to me. Can anyone help me with this? here is the code for my html and php files: Test Comments: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help with mail() using smtp-auth
mail function cannot do stmp-auth, but there are classes that can, check out www.phpclasses.org/mimemessage Trell wrote: Hello, first time on the list, and I'm trying to learn PHP. Here is my setup, 2 servers, 1 is the MTA and 1 is the Web Server. The MTA is a qmail server with smtp-auth that needs to have a user name and password supplied to it to accept the mail for delivery. How do I tell php to send the a username/password in the mail() function so that it will deliver the emails? Thanks for your help. Trell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help with mail() using smtp-auth
Hello, first time on the list, and I'm trying to learn PHP. Here is my setup, 2 servers, 1 is the MTA and 1 is the Web Server. The MTA is a qmail server with smtp-auth that needs to have a user name and password supplied to it to accept the mail for delivery. How do I tell php to send the a username/password in the mail() function so that it will deliver the emails? Thanks for your help. Trell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Help with mail...
It's just part of the rules. Variables are not evaluated when they are between single quotes, they are between double quotes. Echo 'This is $var'; Will output that string, literally. Echo "This is $var"; Will take the value of $var, if any, and place it in the string. ---John Holmes... > -Original Message- > From: Chuck PUP Payne [mailto:[EMAIL PROTECTED]] > Sent: Sunday, September 22, 2002 11:53 PM > To: [EMAIL PROTECTED] > Cc: PHP General > Subject: Re: [PHP] Help with mail... > > Ok, that work. Why does the ' (quote) not make it work is it because it's > an > array? Any thanks John that got it work. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help with mail...
strings in double quotes are evaluated looking for $vars and {$vars} to substitute. strings with in single quotes are not evaluated for vars. $var = "my favourite color is {$col}"; // works $var = "my favourite color is $col";// works $var = 'my favourite color is $col';// doesn't work $var = 'my favourite color is ' . $col; // works Same applies to strings within functions: include('{$dir}/{$file}.inc') // doesn't work include('$dir/$file.inc') // doesn't work include($dir.'/'.$file.'.inc') // works include("{$dir}/{$file}.inc") // works include("$dir/$file.inc") // probably works Nothing to do with arrays :) HTH Justin on 23/09/02 1:52 PM, Chuck PUP Payne ([EMAIL PROTECTED]) wrote: > Ok, that work. Why does the ' (quote) not make it work is it because it's an > array? Any thanks John that got it work. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help with mail...
Ok, that work. Why does the ' (quote) not make it work is it because it's an array? Any thanks John that got it work. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Help with mail...
Variables are not evaluated within single quotes. You are trying to send an email to $address, literally. If you just have a single variable, lose the quotes entirely. Mail($address,$subject,$body); ---John Holmes... > -Original Message- > From: Chuck "PUP" Payne [mailto:[EMAIL PROTECTED]] > Sent: Sunday, September 22, 2002 11:41 PM > To: PHP General > Subject: [PHP] Help with mail... > > Hi, > > Well after read php.net and my copy php 4 bible. I am lost with mail. I > can > get it to work if I do this... > > Mail ('[EMAIL PROTECTED]', 'Data Added', >$fname, $lname .); > > But I can't get this to work...I know someone going to call me stupid but > I > am really having people with mail(), Is there a special place to put it? > > Here example of my codeany way I trying to hammer it out and using > google to see where the error of my way is. > > Chuck Payne > > > --- > > > > Killers Added > > > > > > if ($fname=="") { > echo "You did not supply a first name. Please hit the 'Back' button on > your browser and fill in a name.\n"; > exit; > } > > if ($lname=="") { > echo "You did not supply a Last Name. Please hit the 'Back' button on > your browser and fill in a name.\n"; > exit; > } > > if ($title=="") { > echo "You did not supply a Movie Title. Please hit the 'Back' button > on > your browser and fill in a name.\n"; > exit; > } > > $dbh = mysql_connect("deathtoasp", "zombieuser", "eatmsbrains") > or die ("Unable to connect to database"); > mysql_select_db("slashers", $dbh) > or die ("An error was reported"); > > $table_name = "deathmovies"; > > $statement = "INSERT INTO $table_name (fname, lname, title) VALUES > (\"$fname\", \"$lname\", \"$title\")"; > > $result = mysql_query($statement, $dbh); > > if ($result) { > > echo "Adding the following record"; > echo ""; > echo "Actor/Actress: $fname $lname > "; > echo ""; > echo "Movie: $title"; > echo "Add more Actor/Actress and Movie > which they stared in"; > echo ""; > >$address = "[EMAIL PROTECTED]"; >$Subject = "The new movie and actor added to phpMovie Library"; >$body = "Adding the following record > Actor/Actress: '$fname $lname' > Movie: '$title'"; > > > mail('$address', '$Subject', '$body .'); > > } else { > > echo "There was an error saving your entry. Please try back in a > little while."; > } > > ?> > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help with mail...
Hi, Well after read php.net and my copy php 4 bible. I am lost with mail. I can get it to work if I do this... Mail ('[EMAIL PROTECTED]', 'Data Added', $fname, $lname .); But I can't get this to work...I know someone going to call me stupid but I am really having people with mail(), Is there a special place to put it? Here example of my codeany way I trying to hammer it out and using google to see where the error of my way is. Chuck Payne --- Killers Added Adding the following record"; echo ""; echo "Actor/Actress: $fname $lname "; echo ""; echo "Movie: $title"; echo "Add more Actor/Actress and Movie which they stared in"; echo ""; $address = "[EMAIL PROTECTED]"; $Subject = "The new movie and actor added to phpMovie Library"; $body = "Adding the following record Actor/Actress: '$fname $lname' Movie: '$title'"; mail('$address', '$Subject', '$body .'); } else { echo "There was an error saving your entry. Please try back in a little while."; } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help with mail() function!
No I only work on *nix platforms "Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > You wouldn't happen to be on a windows system? Read the "Warning:" on the > manual page: > http://www.php.net/manual/en/function.mail.php > > --Dan > > -- >PHP classes that make web design easier > SQL Solution | Layout Solution | Form Solution > sqlsolution.info | layoutsolution.info | formsolution.info > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help with mail() function!
You wouldn't happen to be on a windows system? Read the "Warning:" on the manual page: http://www.php.net/manual/en/function.mail.php --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help with mail() function!
Hello all, I am trying to build a php driven mailing list where i can send an email to the whole list. Here is my code: " . ","; $header = "From: Test List <[EMAIL PROTECTED]>"; include("pop3.php"); $user="irc"; $password="*"; $apop=0; $pop3_connection=new pop3_class; $pop3_connection->hostname="localhost"; if(($error=$pop3_connection->Open())=="") { echo "Connected to the POP3 server $pop3_connection->hostname\n"; if(($error=$pop3_connection->Login($user,$password,$apop))=="") { echo "User $user logged in.\n"; if(($error=$pop3_connection->RetrieveMessage(1,&$headers,&$body,2))=="") { echo "Message 1:\n---Message headers starts below---\n"; for($line=0;$line",HtmlSpecialChars($headers[$line]),"\n"; $fullheader=$fullheader.$headers[$line]."\r\n"; } echo "---Message headers ends above---\n---Message body starts below---\n"; for($line=0;$line",HtmlSpecialChars($body[$line]),"\n"; $fullbody = $fullbody . $body[$line]; } echo "---Message body ends above---\n"; } } } if($error=="" && ($error=$pop3_connection->Close())=="") echo "Disconnected from the POP3 server $pop3_connection->hostname\n"; echo("$error"); $i1=strpos($fullheader,"Subject:"); $i2=strlen($fullheader)-$i1; $subject=substr($fullheader,$i1,$i2); $subject=substr($subject,9,strlen($subject)); $subject = "[MediaSoft] " . $subject; //mail($to, $subject, $body, $headers) or die("tet"); mail($to, $subject, $fullbody, "From: [EMAIL PROTECTED]"); ?> I got the pop3.php from www.weberdev.com its a class to download emails from a POP3 server. My problem is: When i send an email from a PHP emailer using mail() function to my mailing list Message Subject is test, Message body is test. I run my script and my message source looks like this: Return-Path: <[EMAIL PROTECTED]> Delivered-To: [EMAIL PROTECTED] Received: (qmail 30667 invoked by alias); 11 Jul 2002 13:04:08 - Delivered-To: [EMAIL PROTECTED] Received: (qmail 30662 invoked by uid 99); 11 Jul 2002 13:04:08 - Date: 11 Jul 2002 13:04:08 - Message-ID: <[EMAIL PROTECTED]> To: Henning Tamas <[EMAIL PROTECTED]>, Root <[EMAIL PROTECTED]>, Subject: [MediaSoft] test //---Header ends here I added this line From: Test List <[EMAIL PROTECTED]> From: [EMAIL PROTECTED] test And as you see From: [EMAIL PROTECTED] is in the header section of the mail() function. What can I do to fix this problem? Thomas Henning P.S. I tryed these to fix it: 1)$header="From: [EMAIL PROTECTED] \r\n"; 2)$header=""; mail($to,$subject,$message,$header,[EMAIL PROTECTED]); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RE:[PHP] Help with mail
You know why he barks? Tell me! At 08:06 PM 5/30/2002 -0700, r wrote: >What is this? magicians day? >I have a dog, can you tell me why he barks sometimes? > >Show us some code dude, or is it "code red" classified? >There could be a dozen possible reasons but if you show the code you stand a >better chance of finding out what the problem is, from me or the other dudes >on the listmore likely from the other dudes...:-) > >Cheers, >-Ryan. > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE:[PHP] Help with mail
What is this? magicians day? I have a dog, can you tell me why he barks sometimes? Show us some code dude, or is it "code red" classified? There could be a dozen possible reasons but if you show the code you stand a better chance of finding out what the problem is, from me or the other dudes on the listmore likely from the other dudes...:-) Cheers, -Ryan. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help with Mail NEVERMIND
Oops I was misspelling the recipients name. :) Charles Killmer -- Original Message -- From: "charlesk " <[EMAIL PROTECTED]> Reply-To: <[EMAIL PROTECTED]> Date: Thu, 30 May 2002 09:09:33 -0500 I am getting a "Server Error" when I try to send an email to a domain that we host. I dont get that error when I send mail to another domain that we host. I have checked DNS and I am able to ping the required hosts. Does anyone have any suggestions for what is causing this "Server Error"? Thanks for any help Charles Killmer IIS 5.0 Windows 2000 Server PHP 4.2.1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help with Mail
I am getting a "Server Error" when I try to send an email to a domain that we host. I dont get that error when I send mail to another domain that we host. I have checked DNS and I am able to ping the required hosts. Does anyone have any suggestions for what is causing this "Server Error"? Thanks for any help Charles Killmer IIS 5.0 Windows 2000 Server PHP 4.2.1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php