Here's my code:
$today = getdate();
$to = so*****@somewhere.com;
$subject = "New Application: ".$userdata["username"]." -
".$today['mon']."/".$today['mday']."/".$today['year'];
$message_header = "New Application: ".$userdata["username"];
$message = $message_header."\n
Hello, is this working?";
mail($to, $subject, $message);
It's not located in a loop, so I don't understand why it would send 2 emails
to the reciever?
Any idea's? 10 16485
Jesse Burns aka jburns131 wrote:
Here's my code:
$today = getdate();
$to = so*****@somewhere.com;
$subject = "New Application: ".$userdata["username"]." -
".$today['mon']."/".$today['mday']."/".$today['year'];
$message_header = "New Application: ".$userdata["username"];
$message = $message_header."\n
Hello, is this working?";
mail($to, $subject, $message);
It's not located in a loop, so I don't understand why it would send 2 emails
to the reciever?
Any idea's?
If it's sending 2 emails, it's because:
a) You are calling the mail() function twice
b) Your To: header specifies two addresses, or
c) Your MTA is configured to copy someone automatically.
The most probably reason is you are calling mail() twice.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attglobal.net
==================
"Jesse Burns aka jburns131" <jb*******@jbwebware.comwrote in message
news:J4******************************@comcast.com. ..
It's not located in a loop, so I don't understand why it would send 2
emails to the reciever?
Any idea's?
I had the *exact* same problem - weird as hell, ain't it?
It didn't happen on all pages, just the one - and even stepping through it
in my code editor showed that I was not calling twice.
But still - two friggin mails.
I think it has something to do with the way the server administrator sets up
the mail system.
In my case, sending to a bad email address didn't just return false - it
crashed PHP.
I called the ISP and they immediately "fixed" it, so that bad sends returned
false.
But then - this problem cropped up.
The way I "solved" (for lack of a better word) was to, in that page, not put
the mail() command in a function.
Instead, I put it inline with an if-then.
So... instead of this.
function fnDo() {
mail();
}
I used this:
function fnDo(){
$bDo = true;
}
if($bDo){
mail();
}
Thanks for the input :-)
ok, here's where it gets really odd. Out of the 2 email sent, only one has
the $_POST data that I'm sending. The other doesn't?
Any idea's?
"Jesse Burns aka jburns131" <jb*******@jbwebware.comwrote in message
news:J4******************************@comcast.com. ..
Here's my code:
$today = getdate();
$to = so*****@somewhere.com;
$subject = "New Application: ".$userdata["username"]." -
".$today['mon']."/".$today['mday']."/".$today['year'];
$message_header = "New Application: ".$userdata["username"];
$message = $message_header."\n
Hello, is this working?";
mail($to, $subject, $message);
It's not located in a loop, so I don't understand why it would send 2
emails to the reciever?
Any idea's?
Jesse Burns aka jburns131 wrote:
Thanks for the input :-)
ok, here's where it gets really odd. Out of the 2 email sent, only one has
the $_POST data that I'm sending. The other doesn't?
Any idea's?
"Jesse Burns aka jburns131" <jb*******@jbwebware.comwrote in message
news:J4******************************@comcast.com. ..
>Here's my code:
$today = getdate();
$to = so*****@somewhere.com;
$subject = "New Application: ".$userdata["username"]." - ".$today['mon']."/".$today['mday']."/".$today['year'];
$message_header = "New Application: ".$userdata["username"];
$message = $message_header."\n
Hello, is this working?";
mail($to, $subject, $message);
It's not located in a loop, so I don't understand why it would send 2 emails to the reciever?
Any idea's?
Yep, you're probably calling mail() somewhere else. Or calling it twice
- i.e. after reloading the page.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attglobal.net
==================
..oO(Jesse Burns aka jburns131)
>Thanks for the input :-)
ok, here's where it gets really odd. Out of the 2 email sent, only one has the $_POST data that I'm sending. The other doesn't?
Any idea's?
What does the server logfile say? Is the page requested twice?
Micha
Hello :-)
I'm not very familiar with what and where the server logfile is. I have full
control of my server, and cpanel/whm. Could you please point me to where the
logfile might be?
Thanks in advance.
"Michael Fesser" <ne*****@gmx.dewrote in message
news:s1********************************@4ax.com...
.oO(Jesse Burns aka jburns131)
>>Thanks for the input :-)
ok, here's where it gets really odd. Out of the 2 email sent, only one has the $_POST data that I'm sending. The other doesn't?
Any idea's?
What does the server logfile say? Is the page requested twice?
Micha
..oO(Jesse Burns aka jburns131)
>I'm not very familiar with what and where the server logfile is. I have full control of my server, and cpanel/whm. Could you please point me to where the logfile might be?
Usually on *nix systems it's somewhere in /var/log, but dependent on the
system and server setup the location might differ. I'm not familiar with
cPanel (usually I either use a direct SSH login or my host's own admin
software) - does it have an option to access the server logs? Sometimes
you might also be able to reach them via FTP. If you still can't get
them, ask your host.
Micha
On Nov 25, 5:56 pm, "Jesse Burns aka jburns131"
<jburns...@jbwebware.comwrote:
Hello :-)
I'm not very familiar with what and where the server logfile is. I have full
control of my server, and cpanel/whm. Could you please point me to where the
logfile might be?
Thanks in advance.
"Michael Fesser" <neti...@gmx.dewrote in message
news:s1********************************@4ax.com...
.oO(Jesse Burns aka jburns131)
>Thanks for the input :-)
>ok, here's where it gets really odd. Out of the 2 email sent, only one has the $_POST data that I'm sending. The other doesn't?
>Any idea's?
What does the server logfile say? Is the page requested twice?
Micha
Smells to me you're require-ing this file from somewhere and your code
gets
required twice. Try doing the require_once, or organize your code
better.
Just an idea, though.
Darko
Jerry Stuckle wrote:
Jesse Burns aka jburns131 wrote:
>Here's my code:
$today = getdate();
$to = so*****@somewhere.com;
$subject = "New Application: ".$userdata["username"]." - ".$today['mon']."/".$today['mday']."/".$today['year'];
$message_header = "New Application: ".$userdata["username"];
$message = $message_header."\n
Hello, is this working?";
mail($to, $subject, $message);
It's not located in a loop, so I don't understand why it would send 2 emails to the reciever?
Any idea's?
If it's sending 2 emails, it's because:
a) You are calling the mail() function twice
b) Your To: header specifies two addresses, or
c) Your MTA is configured to copy someone automatically.
The most probably reason is you are calling mail() twice.
Had the same problem once... it's a good chance that the script is
being called twice. Usually caused by a page reload somewhere else in
the HTML/Javascript. In my case I had a FORM that was getting posted
twice but I can't remember what was causing the page to reload. I think
it was some bad logic in conjunction with a header() call.
Norm This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: VB Programmer |
last post by:
My company has it's own webserver, which is going to host our ASP.NET web
application. We want the website to be able to send out emails.
1. What do I need on the server so that it has the...
|
by: Mr. x |
last post by:
Hello,
I am sending emails with Hebrew contents.
When receiving emails - I cannot see the Hebrew characters (it is not
outlook express configuration, because when receiving emails from friends -...
|
by: martintillbrook |
last post by:
I am using the simple mail() fucntion in a php script but the emails
that are being generated and being trapped by Microsoft Exchange server
2003 Inteligent message filter as having an SCL rating...
|
by: crescent_au |
last post by:
I am developing a simple mailing system. This requires sending emails
in HTML format to one or more recipient. I am currently using PHP's
mail() function. It works alright but it doesn't seem...
|
by: akuva |
last post by:
I have to send more than 100s of email using a php code if i use mail
function whether it will be sent to spam or inbox. If it is sent to
spam which is the other way to send mass email from php. i...
| |
by: LacrosseB0ss |
last post by:
Hey all!
I am coding a page in php to send an e-mail to 2 addresses (to and cc). The user fills out 2 text boxes on a form. The first will be the body of the message and the 2nd is return...
|
by: b00gieman |
last post by:
Hi! I have problems with an email component developed using cdo message.I don't get any kind of error,but the messages don't reach rhe destination.The application is developed in visual basic.Here's...
|
by: shybe |
last post by:
I have a send mail script on my site that.
The emails are recieved by gmail, and yahoo, but not to mail clients
like Outlook, Mail, etc...)
Is this a problem with the script, or is it...
|
by: noha khalifa |
last post by:
Hi all,
I want to send mails using php mail() function, my web server is
apache on linux i just add this line to my code
ini_set('sendmail_from', 'users@must.edu.eg');
i'm sending emails to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |