Re: [PHP] HELP with mail()

2007-04-06 Thread Tijnema !

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



Re: [PHP] Help with mail() function

2004-02-02 Thread Russell Shaw
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

2004-02-02 Thread Pooya Eslami
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

2004-02-02 Thread Matt Matijevich
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

2004-02-02 Thread Matt Matijevich
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

2004-02-02 Thread Matt Matijevich
[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



Re: [PHP] help with mail() using smtp-auth

2003-10-26 Thread Marek Kilimajer
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


RE: [PHP] Help with mail...

2002-09-23 Thread John Holmes

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...

2002-09-22 Thread Justin French

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...

2002-09-22 Thread Chuck PUP Payne

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...

2002-09-22 Thread John Holmes

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




Re: [PHP] help with mail() function!

2002-07-12 Thread Thomas \"omega\" Henning

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!

2002-07-12 Thread Analysis & Solutions

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] RE:[PHP] Help with mail

2002-05-30 Thread Ed Gorski

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

2002-05-30 Thread r

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

2002-05-30 Thread charlesk

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