Hello Sir/ Madam,
I solve my problem. I can't end loop in this script. I receive two time mail. I wanna receive only one time mail. - <?php
-
$txtName=$_REQUEST['txtName'];
-
$txtEmail=$_REQUEST['txtEmail'];
-
$txtCompany=$_REQUEST['txtCompany'];
-
$txtPhone=$_REQUEST['txtPhone'];
-
$txtSubject=$_REQUEST['txtSubject'];
-
$txtDetail=$_REQUEST['txtDetail'];
-
-
$to = "your_name@gmail.com";
-
$headers = "From:" . $txtEmail . "\r\n";
-
$headers .= "Reply-To:" . $txtEmail . "\r\n";
-
$headers .= "Return-Path:" . $txtEmail . "\r\n";
-
$headers .= "CC: your_name@rediffmail.com\r\n";
-
$headers .= "BCC: your_name@yahoo.co.in\r\n";
-
if (empty($txtDetail))
-
{
-
echo("Please" . "<a href=http://www.xyz.com > Click here" . " to contact us.");
-
}
-
else
-
{
-
$message = "Email sender - " . $txtName ;
-
$message .= "\r\n From Company -" . $txtCompany;
-
$message .= "\r\n Contact Phone -" . $txtPhone;
-
$message .= "\r\n Message -" . $txtDetail;
-
if (mail($to,$txtSubject,$message,$headers) )
-
{
-
$result= "Email has been sent to the customer service! We will respond to you promptly.";
-
-
}
-
else
-
{
-
$result="There was problems sending out the email! Please click" . "<a href=mailto:your_name@gmail.com> Here to contact us";
-
}
-
}
-
?>
Thanks
Kalaram Email addresses removed: for your own safety do not post the email in the technical forums-ajaxrand
5 2988 ak1dnar 1,584
Recognized Expert Top Contributor
Hi Welcome to TheScripts.com
You have posted this thread in the Php-Articles section , So I had to move it back to the Forum. Please use the Php-Forum for posting questions in future. Thanks !
nathj 938
Recognized Expert Contributor
Hello Sir/ Madam,
I solve my problem. I can't end loop in this script. I receive two time mail. I wanna receive only one time mail. - <?php
-
$txtName=$_REQUEST['txtName'];
-
$txtEmail=$_REQUEST['txtEmail'];
-
$txtCompany=$_REQUEST['txtCompany'];
-
$txtPhone=$_REQUEST['txtPhone'];
-
$txtSubject=$_REQUEST['txtSubject'];
-
$txtDetail=$_REQUEST['txtDetail'];
-
-
$to = "your_name@gmail.com";
-
$headers = "From:" . $txtEmail . "\r\n";
-
$headers .= "Reply-To:" . $txtEmail . "\r\n";
-
$headers .= "Return-Path:" . $txtEmail . "\r\n";
-
$headers .= "CC: your_name@rediffmail.com\r\n";
-
$headers .= "BCC: your_name@yahoo.co.in\r\n";
-
if (empty($txtDetail))
-
{
-
echo("Please" . "<a href=http://www.xyz.com > Click here" . " to contact us.");
-
}
-
else
-
{
-
$message = "Email sender - " . $txtName ;
-
$message .= "\r\n From Company -" . $txtCompany;
-
$message .= "\r\n Contact Phone -" . $txtPhone;
-
$message .= "\r\n Message -" . $txtDetail;
-
if (mail($to,$txtSubject,$message,$headers) )
-
{
-
$result= "Email has been sent to the customer service! We will respond to you promptly.";
-
-
}
-
else
-
{
-
$result="There was problems sending out the email! Please click" . "<a href=mailto:your_name@gmail.com> Here to contact us";
-
}
-
}
-
?>
Thanks
Kalaram
Hi Kalaram,
I don't see any loop in this code. Could it be that you were receiving the email twice becaus e your email address was listed twice? It's just a shot in the dark.
Cheers
nathj
pbmods 5,821
Recognized Expert Expert
Changed thread title to better describe the problem (did you know that threads whose titles do not follow the Posting Guidelines actually get FEWER responses?).
Hello Sir/ Madam,
I can't see email address list twice. plz u mark that place where i write twice mail address. Send me ASAP.
Thanks
Kalaram
Hi Kalaram,
I don't see any loop in this code. Could it be that you were receiving the email twice becaus e your email address was listed twice? It's just a shot in the dark.
Cheers
nathj
ak1dnar 1,584
Recognized Expert Top Contributor
Remove the CC: and BCC: addresses from your mail script. who knows Is there any mail forwarder enabled on your mail clients, which sends the CC or BCC headers back to your TO header.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Raphael Gluck |
last post by:
Hi all
I am still finding my feet creating a website in ASP, and i'm trying to get
to grips with users providing feeback to my site.
my webhosts have the dundas mailer installed, and i am trying to get it to
work for me.
does it work in conjuction with regular html? can i add a <form> and text
fields? and then will all that get sent with the page?
I have a little script but i dont know how to modify it
|
by: WoG |
last post by:
I am having a heck of a problem getting this script to email correctly.
A form generates all the values, and the script sends off
confirmation email- except I don't get any of the confirmation emails
I don't get any errors either. I've tried multiple email addresse
(in network, out of network, etc.)
Here is the code:
set objMail = Server.CreateObject("CDONTS.NewMail")
objMail.To = "jesusfreaks18@hotmail.com"
objMail.From =...
|
by: Dave Smithz |
last post by:
Hi,
Thanks to this group I discovered the excellent PHP Mailer
(http://phpmailer.sourceforge.net/) which I use to send emails.
Part of my application emails out hundreds of club members unique URL links
which allow them to register for various things.
Sometimes these URLS are long because they contain custom codes.
Problem I am having is that some members are saying the links do not work
|
by: Paul Marshall |
last post by:
Hi
I am my wits end! I have a PHP script running that captures variables
posted from a form on the previous page. The script then emails the
results using the mail() function.
The script is currently being spammed in two ways:
1) The page is being loaded directly, therefore emailing blank results
2) The variables are made up of an accepted email address (all variables
|
by: Flopper |
last post by:
Hey can anyone help me with a WORKING anonymous mailer php script.
I've looked on the net but only find non working one's.
Greetings Floppie
| |
by: =?Utf-8?B?TWlrZSBI?= |
last post by:
I'm using a block of ASP to allow a user to send a form via e-mail.
However, someone keeps sending me spam through this form
and they're using a bogus return address. I'm testing for a
successful send, which should fail if the return address is
not valid, but I'm still getting the junk.
The block looks like this:
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.RemoteHost = "smtp.xxx.com"
Mailer.FromName =...
|
by: kind1one |
last post by:
I am green to PHP and trying to create outside PHP mailer for html form ,i found the script i need but I can't get it to upload more than one file ,since i do not know exactly where to place script request for file2-file10 as well as the exact line to place extension control and size limit ,SOS , any help would be aprishiated
the mailer script:
<?php
if (strpos($_SERVER, $_SERVER)>7 ||
!strpos($_SERVER, $_SERVER))
...
|
by: Dave Kelly |
last post by:
Sorry for the long post, it is easier to discard information than
to have to wait for it to arrive.
So here goes:
This code worked perfectly when I was an Earthlink customer. Sprint
decided not to pardner with Earthlink and create their own IP. Since
then everything email has been broke.
Sprint/Embarq is the only copper wire DSL provider where I live.
|
by: neovantage |
last post by:
hey geeks,
I have a small mail script which will cause a PHP script to send a receipt upon clicking the submit button, by an HTML mail. This mail contains special characters, namely 'å', 'ä' and 'ö'. Whatever I try, I can't get these characters to display properly everywhere. In some email clients, these characters show up just fine, whereas in others they show up as question marks or kinda boxes. I've tried sending the mail as UTF-8, as...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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 we have to send another system
| |