473,399 Members | 2,146 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,399 software developers and data experts.

Help!! very very WEIRD thing happening with mail() function

I have a simple php script to just send email.....When I first load the
script in a browser...it sends 2 emails. Why?? The weird thing is then
when I refresh the page, it send only one email...I can refresh the page a
million times and each time it only sends 1 email. But its the first time
the page is loaded (like I open a new IE browser and go to the script), it
sends 2 emails (duplicates). The entire script is below:

<?php

$to = "so**@email.address";
$subject = "test";
$contents = "this is a test";
$from_hearder = "WEBMASTER";
mail($to, $subject, $contents, $from_header);

?>

any ideas!?!?!?!?!
Gabe

Jul 17 '05 #1
2 2340

"Gabriel Afana" <ad****@adelphia.net> wrote in message
news:Zq********************@news3.news.adelphia.ne t...
I have a simple php script to just send email.....When I first load the
script in a browser...it sends 2 emails. Why?? The weird thing is then
when I refresh the page, it send only one email...I can refresh the page a
million times and each time it only sends 1 email. But its the first time
the page is loaded (like I open a new IE browser and go to the script), it
sends 2 emails (duplicates). The entire script is below:

<?php

$to = "so**@email.address";
$subject = "test";
$contents = "this is a test";
$from_hearder = "WEBMASTER";
mail($to, $subject, $contents, $from_header);

?>

any ideas!?!?!?!?!
Gabe

I found something out if this will help......I had somebody else go to this
script and it only sent 1 email....but when I go it sends two.....?? How?
Something weird with my computer??

Gabe


Jul 17 '05 #2


Gabriel Afana schrieb:

<?php

$to = "so**@email.address";
$subject = "test";
$contents = "this is a test";
$from_hearder = "WEBMASTER";
mail($to, $subject, $contents, $from_header);

?>

if the script is copy&paste:
$from_hearder = "WEBMASTER" is not the same variable name as you use in
the mail function ... $from_header

--
_____________________________
Monika E. L. Beisel
TU Kaiserslautern
E-Mail: be****@rhrk.uni-kl.de

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Data Goob | last post by:
This one has me stumped. How did SuSE disable the mail() function in their RPM'd version of PHP? ( This is their install-version of PHP with RPMs not what you download from PHP.net ) I have...
1
by: gukn9700 | last post by:
When I used fstream to handle a file, I met with a very weird thing: #include <fstream> #include <iostream> using namespace std; int main() { fstream outfile;
5
by: maya | last post by:
I'm learning how to send mail with php... only thing that mystifies me a bit is I can't get NAME of sender to appear in e-mail INBOX under "from"... I only see e-mail address.. I'm coming from...
2
by: mooneyj | last post by:
I writing a script to send emailing using php and the mail() function. All of the codes is tested on a different server than I am currently using and works. The code I am using now works but it...
2
by: ruthiefy | last post by:
Hi, I am new to ASP.NET and I started working with 2005. I opened a new project and in the Default.aspx Web Form I clicked the "Design" button in the bottom of the screen so I can edit the...
9
by: shror | last post by:
hi every body, i have a problem which is when i was checking my mail() form it work fine but the problem is that the form configuration is not set correctly, in details: the from var is not...
0
by: dgk | last post by:
We have a VS2003 app that we've had to make some changes for, and then we copied the resulting dll to the production server. There is a login screen that appears with no problem when the app is...
0
by: Ahmad | last post by:
Hello, can any one help me with the following issue: I use PHP mail function to send emails, when I receive these emails I find some exclamation marks (!) added in the text, this is weird. Can...
1
antonopn
by: antonopn | last post by:
Hello there, I have just faced a really weird problem with a query in SQL SERVER 2000. I had a database with collation SQL_Latin1_General_CP1_CI_AS and converted it in a new database with...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
marktang
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
tracyyun
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 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.