473,378 Members | 1,334 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,378 software developers and data experts.

PHP mail

23
Hi,
I have a php mail program,
<HTML>
<BODY>
<?php

$to = "me@myhost.com";
$from = "me@myhost.com";

$subject = "Hi This is a test mail";
$body = "Testing Email program and works";
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$headers .= "From:$from\n";

mail($to, $subject, $body, $headers);
if (mail($to, $subject, $body, $headers))
{
echo("<p>Message successfully sent!to $to</p>");

} else {
echo("<p>Message delivery failed...Can't send email to $to</p>");
}
?>
</BODY>
</HTML>
The problem is i could not have any errors but i could not able to receive mail in my mailbox. I am working on PHP,MySQL,Apache, and Linux.
So have /etc/exim/exim.conf ---- (exim 3.36)
/etc/php4/apache/php.ini
how to configure?
please help me.
Thanks
Glady.
Nov 3 '06 #1
10 1975
vssp
268 100+
Go to php.ini file to enter the mail server and restart the server.

Then only the mail send to another user\

vssp
Nov 4 '06 #2
ronverdonk
4,258 Expert 4TB
Don't you have a blank character between From: and the from-address? If not, that is most likely your problem.

Ronald :cool:
Nov 7 '06 #3
glady
23
Go to php.ini file to enter the mail server and restart the server.

Then only the mail send to another user\

vssp

--------
Hi how do i need to restart my mail server,

actually in php.ini, i have this,
[mail function]
; For Win32 only.
;SMTP = localhost
;smtp_port = 25

; For Win32 only.
;sendmail_from = myemail@mydomain.com

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
sendmail_path =
please help!!!!! i was trying to make it work for many days.
Nov 8 '06 #4
glady
23
Don't you have a blank character between From: and the from-address? If not, that is most likely your problem.

Ronald :cool:
I did by giving a blank character between From: $from
but it dint work.
please help!!!!!!
Nov 8 '06 #5
glady
23
Don't you have a blank character between From: and the from-address? If not, that is most likely your problem.

Ronald :cool:
I would like to have a drop down box1, and it has 2 items in it.
First when the form loaded, it should show that drop down box1 with 2 items in it.
If i select item #2, in dropdown box1, another drop down box should appear. if i select item#1 in drp down box 1, another drop down box should disappear.
How i can do it.
<td align="right"><b>Fruit :</b></td>
<td><select name="saletype" size="1" class="text" tabindex="9" onChange="showcombobox(this.form);">
<option value="0" SELECTED>Apple</option>
<option value="2">Orange</option>
</select>
<SPAN name="Q1" id="Q1" STYLE="position:relative; visibility: hide;">
<select name="sfruit" size="1" class="text" tabindex="10">
<option value="0" SELECTED></option>
<option value="1">grapefruit</option>
<option value="2">lemon</option>
<option value="3">lime</option>
<option value="4">melon</option>
</select>
</SPAN>
</td>
function appear(obj) {
obj.style.display = "";
}
function showcombobox(form){
if(form.saletype.value=="2"){
appear(Q1);
}
}
could you help me the code, thanks.
Nov 8 '06 #6
ronverdonk
4,258 Expert 4TB
The last question does not belong in this thread, this one was about PHP AND EMAIL! Open another one for this problem. And make sure to enclose your code with tags.

If you don't know what I am talking about, then you omitted to read the Posting Guidelines, especially the part about showing code WITHIN code, html and php TAGS!!


As for this problem, see thread http://www.thescripts.com/forum/thread560758.html

Ronald :cool:
Nov 8 '06 #7
ronverdonk
4,258 Expert 4TB
--------
Hi how do i need to restart my mail server,

actually in php.ini, i have this,
[mail function]
; For Win32 only.
;SMTP = localhost
;smtp_port = 25

; For Win32 only.
;sendmail_from = myemail@mydomain.com

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
sendmail_path =
please help!!!!! i was trying to make it work for many days.
Are you running Windows or Unix for your email problem.

Ronald :cool:
Nov 8 '06 #8
glady
23
Are you running Windows or Unix for your email problem.

Ronald :cool:
I am running Linux, php , apache , mysql
Nov 8 '06 #9
glady
23
I am running Linux, php , apache , mysql
/etc/exim/exim.conf
for email server
/etc/php4/apache/php.ini
for php conf
Nov 8 '06 #10
ronverdonk
4,258 Expert 4TB
You are cross posting. DO NOT DO THAT, IT CONFUSES OUR MEMBERS AND ME!!

You had you answer about the same problem in another thread http://www.thescripts.com/forum/post2189812-8.html in this forum, so I will close this discussion for you.

Ronald :cool:
Nov 8 '06 #11

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

Similar topics

0
by: Merijn Boom | last post by:
Hi there, I'm trying to create an html mail with embedded pictures in it. I run perl on Windows and Red Hat but I cannot get your module (Mail::Sender) to work. I'm just trying to run the...
6
by: DigitalRick | last post by:
I have been running CDONTS in my ASPpages to send emails to me sent from my guestbook. It had been working fine untill I upgraded to Server 2003 (I am also running Exchange 2003) all locally. I...
3
by: Phil Mc | last post by:
Hi has anyone come accross the problem.... with referance to System.Web.Mail.MailMessage and System.Web.Mail.SmtpMail THIS WORKS FINE mail=new MailMessage(); mail.From =...
3
by: RN | last post by:
I am tired of sending mail from the built-in SMTP service for so many reasons (errors are nondescriptive in the event log, it doesn't let me control which IP address it sends from, and it...
34
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow...
4
by: J Huntley Palmer | last post by:
How may I setup a proper HTML mail message with embedded href links using PHP, that follows all the MIME rules? Any examples or links would be appreciated. Thanks!
2
by: clevrmnkey | last post by:
I've had nothing but trouble from the System.Net.Mail objects, but I finally need to make them work, and I can't for the life of me see what I'm doing wrong. I pared back my mail transaction to...
6
by: cover | last post by:
I'm using PHP 5 at home w/Apache & MySQL on a test system where I write through a form to a database and also send an email to people on a drop down list. Purpose for this is an electronic log at...
2
by: Ruud | last post by:
Just before leaving for a holiday my collegue modified this script. Now it won't send any body text (The data filled in on the form) and in an error condition it won't send any attachments either....
2
mikek12004
by: mikek12004 | last post by:
Before posting here I google it and saw ablut 30 pages for a solution so I pretty much excluded the obvious things. The code is <?php //now to send the mails to seller...
1
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: 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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.