473,320 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

sending mail - error . how to solve

Hi

While sending email in php , i'm getting the following error
"
[client 125.22.241.188] PHP Parse error: parse error, unexpected T_STRING in /var/www/html/sample/sendmail.php on line 6, referer: http://125.22.241.188/sample/email.php
[Thu Aug 31 09:44:25 2006] [error] [client 125.22.241.188] File does not exist: /var/www/html/favicon.ico
"

code :

<?
$to = "munish_lcs@yahoo.com";
$from_header = "From: $from";
//if($contents != "")
{
send mail - $subject & $contents come from surfer input
mail($to, $subject, $contents, $from_header);
// redirect back to url visitor came from
// header("Location: $HTTP_REFERER");
}
//else
{
//print("<HTML><BODY>Error, no comments were submitted!");
//print("</BODY></HTML>");
}
?>

Please post your replies
Thanks in advance
-Somaskarthic
Aug 31 '06 #1
2 1648
Banfa
9,065 Expert Mod 8TB
Is this line

send mail - $subject & $contents come from surfer input

supposed to be a comment?
Aug 31 '06 #2
Hi

The statement
//send mail - $subject & $contents come from surfer input
is a comment. But it shows the error

somaskarthic


<?
$to = "munish_lcs@yahoo.com";
$from_header = "From: $from";
//if($contents != "")
{
//send mail - $subject & $contents come from surfer input
mail($to, $subject, $contents, $from_header);
// redirect back to url visitor came from
// header("Location: $HTTP_REFERER");
}
//else
{
//print("<HTML><BODY>Error, no comments were submitted!");
//print("</BODY></HTML>");
}
?>


Is this line

send mail - $subject & $contents come from surfer input

supposed to be a comment?
Aug 31 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Serge Myrand | last post by:
Hi everybody, The following code for sending email (found on msn I think) works find when used in a .VBS file. I double click the file and the mail is send. When I use the same code in my .ASP...
1
by: Cantekin Guneser | last post by:
i try to send mail in my wep application, i use code below private void B_Ok_Click(object sender, System.EventArgs e) { MailMessage msg = new MailMessage(); msg.To =...
2
by: barry | last post by:
The code below is in a button but though there is no error message of any kind I am not getting the email which I am sending to myself. Any help would be appreciated. ...
1
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to...
5
by: Richard Kure | last post by:
I encountered a problem sending an email on my windows XP, which I thought was a bit weird, cause it worked for me before on windows XP. So I tried on some other computers with windows XP, and...
1
rsrinivasan
by: rsrinivasan | last post by:
Hi, I am Sending mail from java. When I run the program I hava Following error.. DEBUG: setDebug: JavaMail version 1.4ea DEBUG: getProvider() returning javax.mail.Provider DEBUG SMTP:...
1
by: sathyan8294 | last post by:
i am using vb.net 2003.i am doing my project in vb.net windows application.the following code is for sending mail. Dim mymailmessage As New MailMessage Try Dim bSuccess As Boolean = True...
9
by: JoeP | last post by:
Hi All, How can I find the reason for such an error: Failure sending mail. Some Code... oMailMessage.IsBodyHtml = False oMailMessage.Body = cEmailBody Dim oSMTP As New SmtpClient...
4
by: =?Utf-8?B?R3V5IENvaGVu?= | last post by:
Hi all I use: Dim message As New MailMessage(txtTo.Text, txtFrom.Text, txtSubject.Text, txtBody.Text) Dim emailClient As New SmtpClient(txtSMTPServer.Text) emailClient.Send(message) And its...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.