freelanceprogrammers.org Forum Index » PHP
problem in sending email from php form
Joined: 24 May 2005
Posts: 9
problem in sending email from php form
Hi, I have a problem in sending email from php form.
I use the following page to send mail
http://www.talentlogo.com/asp/send3.php
But unfortunately no thing was sent, I have attached the source code to you and
I hope that you can help me.
<?php
//Check whether the submission is made
if(isset($hidSubmit)){
//Declarate the necessary variables
$mail_to=$txtEmailto;
$mail_from=$txtEmailfrm;
$mail_sub=$txtSub;
$mail_mesg=$txtMsg;
//Check for success/failure of delivery
if(mail($mail_to,$mail_sub,$mail_mesg,"From:$mail_from/r/nReply-to:$mail_from"))
echo "<span class=`textred`>E-mail has been sent successfully from $mail_sub to
$mail_to</span>";
else
echo "<span class=`textred`>Failed to send the E-mail from $mail_sub to
$mail_to</span>";
}
?>
<form name="frmsendmail" method="post" action="" onSubmit="return
ValidationForm()">
<table width="100%" border="0">
<tr>
<td width="33%" align="right" class="text">To :
<td width="67%"><input name="txtEmailto" type="text" class="input"
id="txtEmailto22" size="30" maxlength="100">
</tr>
<tr>
<td align="right" class="text">From :
<td><input name="txtEmailfrm" type="text" class="input"
id="txtEmailfrm22" size="30" maxlength="100">
</tr>
<tr>
<td align="right" class="text">Subject :
<td><input name="txtSub" type="text" class="input" id="txtSub22"
size="30" maxlength="100">
</tr>
<tr>
<td align="right" class="text">Mesage(body) :
<td><textarea name="txtMsg" cols="50" rows="10" class="input"
id="textarea"></textarea>
</tr>
<tr>
<td align="right"><input name="hidSubmit" type="hidden" id="hidSubmit"
value="true">
<input name="Submit" type="submit" class="input" value="Send">
<td><input name="Submit2" type="reset" class="input" value="Reset">
</tr>
</table>
</form>
Regards
Ahmed Sirag
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
[Non-text portions of this message have been removed]
Joined: 19 Aug 2005
Posts: 4
problem in sending email from php form
what is ur problem? send error u got..
--- ahmed sirag <seragart4@...> wrote:
>
> Hi, I have a problem in sending email from php form.
>
> I use the following page to send mail
>
> http://www.talentlogo.com/asp/send3.php
>
> But unfortunately no thing was sent, I have attached
> the source code to you and I hope that you can help
> me.
>
> <?php
>
> //Check whether the submission is made
> if(isset($hidSubmit)){
>
> //Declarate the necessary variables
> $mail_to=$txtEmailto;
> $mail_from=$txtEmailfrm;
> $mail_sub=$txtSub;
> $mail_mesg=$txtMsg;
>
> //Check for success/failure of delivery
>
if(mail($mail_to,$mail_sub,$mail_mesg,"From:$mail_from/r/nReply-to:$mail_from"))
> echo "<span class=`textred`>E-mail has been sent
> successfully from $mail_sub to $mail_to</span>";
> else
> echo "<span class=`textred`>Failed to send the
> E-mail from $mail_sub to $mail_to</span>";
> }
> ?>
>
> <form name="frmsendmail" method="post" action=""
> onSubmit="return ValidationForm()">
> <table width="100%" border="0">
> <tr>
> <td width="33%" align="right"
> class="text">To :
> <td width="67%"><input name="txtEmailto"
> type="text" class="input" id="txtEmailto22"
> size="30" maxlength="100">
> </tr>
> <tr>
> <td align="right" class="text">From :
> <td><input name="txtEmailfrm" type="text"
> class="input" id="txtEmailfrm22" size="30"
> maxlength="100">
> </tr>
> <tr>
> <td align="right" class="text">Subject :
> <td><input name="txtSub" type="text"
> class="input" id="txtSub22" size="30"
> maxlength="100">
> </tr>
> <tr>
> <td align="right"
> class="text">Mesage(body) :
> <td><textarea name="txtMsg" cols="50"
> rows="10" class="input" id="textarea"></textarea>
> </tr>
> <tr>
> <td align="right"><input name="hidSubmit"
> type="hidden" id="hidSubmit" value="true">
> <input name="Submit" type="submit"
> class="input" value="Send">
> <td><input name="Submit2" type="reset"
> class="input" value="Reset">
> </tr>
> </table>
> </form>
>
>
>
>
>
>
>
> Regards
> Ahmed Sirag
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
>
> [Non-text portions of this message have been
> removed]
>
>
____________________________________________________
Send a rakhi to your brother, buy gifts and win attractive prizes. Log on to
http://in.promos.yahoo.com/rakhi/index.html
Joined: 08 May 2005
Posts: 7
problem in sending email from php form
Use: $_POST or $_HTTP_POST_VARS
$mail_to=$_POST[`txtEmailto`];
$mail_from=$_POST[`txtEmailfrm`];
and so on ...
-husain-
-------------------------
Original Message:
From: ahmed sirag <seragart4@...>
Date: Friday, August 19 2005 03:30 PM
Subject: [php-objects] problem in sending email from php form
Hi, I have a problem in sending email from php form.
I use the following page to send mail
http://www.talentlogo.com/asp/send3.php
But unfortunately no thing was sent, I have attached the source code to you and
I hope that you can help me.
<?php
//Check whether the submission is made
if(isset($hidSubmit)){
//Declarate the necessary variables
$mail_to=$txtEmailto;
$mail_from=$txtEmailfrm;
$mail_sub=$txtSub;
$mail_mesg=$txtMsg;
<form name="frmsendmail" method="post" action="" onSubmit="return
ValidationForm()">
Joined: 19 Aug 2005
Posts: 1
problem in sending email from php form
Try with action="post", It may be works.
--------------------------------------------------
On Fri, 19 Aug 2005 Kolangi Mohan.A wrote :
>what is ur problem? send error u got..
>--- ahmed sirag <seragart4@...> wrote:
>>
>> Hi, I have a problem in sending email from php form.
>>
>> I use the following page to send mail
>>
>>
>http://www.talentlogo.com/asp/send3.php
>>
>> But unfortunately no thing was sent, I have attached
>> the source code to you and I hope that you can help
>> me.
>>
>> <?php
>>
>> //Check whether the submission is made
>> if(isset($hidSubmit)){
>>
>> //Declarate the necessary variables
>> $mail_to=$txtEmailto;
>> $mail_from=$txtEmailfrm;
>> $mail_sub=$txtSub;
>> $mail_mesg=$txtMsg;
>>
>> //Check for success/failure of delivery
>>
>if(mail($mail_to,$mail_sub,$mail_mesg,"From:$mail_from/r/nReply-to:$mail_from")
)
>> echo "<span class=`textred`>E-mail has been sent
>> successfully from $mail_sub to $mail_to</span>";
>> else
>> echo "<span class=`textred`>Failed to send the
>> E-mail from $mail_sub to $mail_to</span>";
>> }
>> ?>
>>
>> <form name="frmsendmail" method="post" action=""
>> onSubmit="return ValidationForm()">
>> <table width="100%" border="0">
>> <tr>
>> <td width="33%" align="right"
>> class="text">To :
>> <td width="67%"><input name="txtEmailto"
>> type="text" class="input" id="txtEmailto22"
>> size="30" maxlength="100">
>> </tr>
>> <tr>
>> <td align="right" class="text">From :
>> <td><input name="txtEmailfrm" type="text"
>> class="input" id="txtEmailfrm22" size="30"
>> maxlength="100">
>> </tr>
>> <tr>
>> <td align="right" class="text">Subject :
>> <td><input name="txtSub" type="text"
>> class="input" id="txtSub22" size="30"
>> maxlength="100">
>> </tr>
>> <tr>
>> <td align="right"
>> class="text">Mesage(body) :
>> <td><textarea name="txtMsg" cols="50"
>> rows="10" class="input" id="textarea"></textarea>
>> </tr>
>> <tr>
>> <td align="right"><input name="hidSubmit"
>> type="hidden" id="hidSubmit" value="true">
>> <input name="Submit" type="submit"
>> class="input" value="Send">
>> <td><input name="Submit2" type="reset"
>> class="input" value="Reset">
>> </tr>
>> </table>
>> </form>
>>
>>
>>
>>
>>
>>
>>
>> Regards
>> Ahmed Sirag
>> __________________________________________________
>> Do You Yahoo!?
>> Tired of spam? Yahoo! Mail has the best spam
>> protection around
>>
>http://mail.yahoo.com
>>
>> [Non-text portions of this message have been
>> removed]
>>
>>
>
>
>
>____________________________________________________
>Send a rakhi to your brother, buy gifts and win attractive prizes. Log on to
>http://in.promos.yahoo.com/rakhi/index.html
>PHP Data object relational mapping generator -
>http://www.meta-language.net/
>SPONSORED LINKS
>Programming languages
>C programming language
>Computer programming languages
>Java programming language
>C programming language
>History of computer programming language
>YAHOO! GROUPS LINKS
> Visit your group "
>php-objects
>" on the web.
>
> To unsubscribe from this group, send an email to:
>
>php-objects-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to the
>Yahoo! Terms of Service
>.
[Non-text portions of this message have been removed]
Joined: 10 Jul 2005
Posts: 2
problem in sending email from php form
If you get an error the problem could be tha your smtp
server require authentication.
Try to connect with telnet to your smtp server
telnet server.address 25
and write this
ehlo your.domain
check if you see AUTH-.....etc
if that is your case you need to authenticate to the
server before send email.
I hope this can help you.
--- ahmed sirag <seragart4@...> escribió:
---------------------------------
Hi, I have a problem in sending email from php form.
I use the following page to send mail
http://www.talentlogo.com/asp/send3.php
But unfortunately no thing was sent, I have attached
the source code to you and I hope that you can help
me.
<?php
//Check whether the submission is made
if(isset($hidSubmit)){
//Declarate the necessary variables
$mail_to=$txtEmailto;
$mail_from=$txtEmailfrm;
$mail_sub=$txtSub;
$mail_mesg=$txtMsg;
//Check for success/failure of delivery
if(mail($mail_to,$mail_sub,$mail_mesg,"From:$mail_from/r/nReply-to:$mail_from"))
echo "<span class=`textred`>E-mail has been sent
successfully from $mail_sub to $mail_to</span>";
else
echo "<span class=`textred`>Failed to send the E-mail
from $mail_sub to $mail_to</span>";
}
?>
<form name="frmsendmail" method="post" action=""
onSubmit="return ValidationForm()">
<table width="100%" border="0">
<tr>
<td width="33%" align="right" class="text">To
:
<td width="67%"><input name="txtEmailto"
type="text" class="input" id="txtEmailto22" size="30"
maxlength="100">
</tr>
<tr>
<td align="right" class="text">From :
<td><input name="txtEmailfrm" type="text"
class="input" id="txtEmailfrm22" size="30"
maxlength="100">
</tr>
<tr>
<td align="right" class="text">Subject :
<td><input name="txtSub" type="text"
class="input" id="txtSub22" size="30" maxlength="100">
</tr>
<tr>
<td align="right" class="text">Mesage(body)
:
<td><textarea name="txtMsg" cols="50"
rows="10" class="input" id="textarea"></textarea>
</tr>
<tr>
<td align="right"><input name="hidSubmit"
type="hidden" id="hidSubmit" value="true">
<input name="Submit" type="submit"
class="input" value="Send">
<td><input name="Submit2" type="reset"
class="input" value="Reset">
</tr>
</table>
</form>
Regards
Ahmed Sirag
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam
protection around
http://mail.yahoo.com
[Non-text portions of this message have been removed]
PHP Data object relational mapping generator -
http://www.meta-language.net/
SPONSORED LINKS
Programming languages
C programming language
Computer programming languages
Java
programming language
C programming language
History of computer programming language
---------------------------------
YAHOO! GROUPS LINKS
Visit your group "php-objects" on the web.
To unsubscribe from this group, send an email to:
php-objects-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to the Yahoo!
Terms of Service.
---------------------------------
______________________________________________
Renovamos el Correo Yahoo!
Nuevos servicios, más seguridad
http://correo.yahoo.es
Joined: 05 Apr 2000
Posts: 7
problem in sending email from php form
Put this as your form creation:
<?
Echo <form name="frmsendmail" method="post" action=".$_SERVER["PHP_SELF"]."
onSubmit="return ValidationForm()">
?>
The script has no idea where to send the information to, that`s why it`s
failing, assuming you don`t have a parse error somewhere else. This will send
the POST information back to the same page.
-Andrew
-----Original Message-----
From: php-objects@yahoogroups.com [mailto:php-objects@yahoogroups.com] On Behalf
Of Raj
Sent: Friday, August 19, 2005 6:15 AM
To: php-objects@yahoogroups.com
Subject: Re: Re: [php-objects] problem in sending email from php form
Try with action="post", It may be works.
--------------------------------------------------
On Fri, 19 Aug 2005 Kolangi Mohan.A wrote :
>what is ur problem? send error u got..
>--- ahmed sirag <seragart4@...> wrote:
>>
>> Hi, I have a problem in sending email from php form.
>>
>> I use the following page to send mail
>>
>>
>http://www.talentlogo.com/asp/send3.php
>>
>> But unfortunately no thing was sent, I have attached
>> the source code to you and I hope that you can help
>> me.
>>
>> <?php
>>
>> //Check whether the submission is made
>> if(isset($hidSubmit)){
>>
>> //Declarate the necessary variables
>> $mail_to=$txtEmailto;
>> $mail_from=$txtEmailfrm;
>> $mail_sub=$txtSub;
>> $mail_mesg=$txtMsg;
>>
>> //Check for success/failure of delivery
>>
>if(mail($mail_to,$mail_sub,$mail_mesg,"From:$mail_from/r/nReply-to:$mail_from")
)
>> echo "<span class=`textred`>E-mail has been sent
>> successfully from $mail_sub to $mail_to</span>";
>> else
>> echo "<span class=`textred`>Failed to send the
>> E-mail from $mail_sub to $mail_to</span>";
>> }
>> ?>
>>
>> <form name="frmsendmail" method="post" action=""
>> onSubmit="return ValidationForm()">
>> <table width="100%" border="0">
>> <tr>
>> <td width="33%" align="right"
>> class="text">To :
>> <td width="67%"><input name="txtEmailto"
>> type="text" class="input" id="txtEmailto22"
>> size="30" maxlength="100">
>> </tr>
>> <tr>
>> <td align="right" class="text">From :
>> <td><input name="txtEmailfrm" type="text"
>> class="input" id="txtEmailfrm22" size="30"
>> maxlength="100">
>> </tr>
>> <tr>
>> <td align="right" class="text">Subject :
>> <td><input name="txtSub" type="text"
>> class="input" id="txtSub22" size="30"
>> maxlength="100">
>> </tr>
>> <tr>
>> <td align="right"
>> class="text">Mesage(body) :
>> <td><textarea name="txtMsg" cols="50"
>> rows="10" class="input" id="textarea"></textarea>
>> </tr>
>> <tr>
>> <td align="right"><input name="hidSubmit"
>> type="hidden" id="hidSubmit" value="true">
>> <input name="Submit" type="submit"
>> class="input" value="Send">
>> <td><input name="Submit2" type="reset"
>> class="input" value="Reset">
>> </tr>
>> </table>
>> </form>
>>
>>
>>
>>
>>
>>
>>
>> Regards
>> Ahmed Sirag
>> __________________________________________________
>> Do You Yahoo!?
>> Tired of spam? Yahoo! Mail has the best spam
>> protection around
>>
>http://mail.yahoo.com
>>
>> [Non-text portions of this message have been
>> removed]
>>
>>
>
>
>
>____________________________________________________
>Send a rakhi to your brother, buy gifts and win attractive prizes. Log on to
>http://in.promos.yahoo.com/rakhi/index.html
>PHP Data object relational mapping generator -
>http://www.meta-language.net/
>SPONSORED LINKS
>Programming languages
>C programming language
>Computer programming languages
>Java programming language
>C programming language
>History of computer programming language
>YAHOO! GROUPS LINKS
> Visit your group "
>php-objects
>" on the web.
>
> To unsubscribe from this group, send an email to:
>
>php-objects-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to the
>Yahoo! Terms of Service
>.
[Non-text portions of this message have been removed]
PHP Data object relational mapping generator - http://www.meta-language.net/
Yahoo! Groups Links
All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help
China Wholesale - Electronics Products
Character Studio - Tutorials and Help







