473,804 Members | 3,138 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Send Multiple Emails

1 New Member
Hi, I am using PHP mailer to send out 2 different emails.

The problem I am having is only the first email is ever sent out.

Below is my code. The first email $to but i add two mail id mail not sending.

Please help....this is urgent!
[php]$mail = new PHPMailer();
$mail->From = "palani@xxxx.co m";
$mail->FromName = " manager";
$mail->Host = "xxxxx.com" ;
$mail->Mailer = "smtp";
$body .= " manager";
$text_body .= "Sincerely, \n";
$text_body .= "manager";
$mail->Body = $body;
$mail->AltBody = $text_body;
$to='palan@xxxx x.com'; //here add to two mail id
$mail->AddAddress($to ,'palani'); if(!$mail->Send())
echo "There has been a mail error sending to ";
// Clear all addresses and attachments for next loop
$mail->ClearAddresses ();
?>[/php]
reply me
Mar 18 '08 #1
2 2435
myth0s
32 New Member
I use :

[PHP]//php mailer created above....
$mail->AddAddress("ab c@xyz.com", "Guy #1");
$mail->AddAddress("de f@xyz.com", "Guy #2");
//email sent further down....[/PHP]
Mar 18 '08 #2
ronverdonk
4,258 Recognized Expert Specialist
Welcome to TSDN!

Please enclose your posted code in [code] tags (See How to Ask a Question).

This makes it easier for our Experts to read and understand it. Failing to do so creates extra work for the moderators, thus wasting resources, otherwise available to answer the members' questions.

Please use [code] tags in future.

MODERATOR
Mar 18 '08 #3

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

Similar topics

4
4816
by: Thom McGrath | last post by:
I'm writing a simple mailing list program, and I would like to know what the suggested method of sending a large number of emails to a list of addresses. (sounds like spam, no?) It's perfectly legit, it's just an opt-in mailing. I have a feeling that using a 'while' loop with repeated calls to mail() is not the best practice. Is there something better I should be doing?
40
11910
by: ian | last post by:
Hi, I'm a newbie (oh no I can here you say.... another one...) How can I get Python to send emails using the default windows email client (eg outlook express)? I thought I could just do the following import win32com.client
3
2609
kestrel
by: kestrel | last post by:
i need an email form, that i can modify,. i need: 1) it to send to multiple emails 2) html emails 3)will send straight to the person's email, and will hava a subject that i choose, from my email address is that even possible?
4
7689
by: =?Utf-8?B?dHBhcmtzNjk=?= | last post by:
I have a web page that at the click of a button must send a bunch (1000+) emails. Each email is sent individually. I have the code working fine, using Mail Message classes and smtp and all that. But sometimes even when I'm just sending one e-mail the web page takes a minutes or so to post. Can anyone tell me why it is so slow, or how to fix the problem? To address this I am thinking of just creating a queue table to write the emails...
6
2676
by: slider | last post by:
Hey all i am using Access 2003 on Win Xp and i have been trying to make this code send emails to the users stored on each record. So far is works, except in the body of the email i need it to say a number of things, such as Dear (user), your current quota is (quota), and so on. So far i can send the emails to multiple users but when it comes down to writing the message i cannot enter in more than one "rec("field)". In my database i have...
3
2968
by: drnorbert | last post by:
What is the best way to receive and send emails in MsAccess? Could this be done without Outlook automatation?
0
1685
by: =?Utf-8?B?UmljaA==?= | last post by:
Hello, My company will be hosting a webcast, and I need to send out 2000 individual emails to people who signed up (for login information...). I created an smtp app that I can loop through which uses smtp and our Exchange mail server. The smtp app works fine. I tested it on 10 test emails and called Client.Send 10 times. The emails went through (I emailed myself). My question is if anyone knows if Exchange server would be bogged...
5
2170
by: Mike | last post by:
I have a page with a textbox that a user can enter in mutliple email addresses such as: user1@yahoo.com;user2@yahoo.com;user3@gmail.com; and so on, I then have a foreach loop to get all of the emaill addresses and send emails out. the problem is that all of the email addresses the email is being sent to is showing in the section so everyone knows who's getting the email. How can I have 1 email address showing in the section so no...
2
7457
acoder
by: acoder | last post by:
How to Send Mail in Coldfusion You can use Coldfusion to easily send mail. From simple plain text emails to more complex HTML and multipart emails, the job is made a lot easier with Coldfusion. In the following collection of articles, we will cover the basics and gradually move onto more useful examples including using a query to send mail to multiple recipients. The <cfmail> tag If you want to send email in Coldfusion, the cfmail...
0
9579
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10332
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 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...
1
10320
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9150
agi2029
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...
1
7620
isladogs
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...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4299
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
2
3820
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2991
bsmnconsultancy
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.