Click here to Skip to main content
15,882,114 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I'm currently engaged in creating a marketing email, intending to send personalized bulk emails to individual customers. However, if some of the email addresses happen to be nonexistent, there's a risk of my MS Office 365 account getting blocked when these emails bounce back.

How to avoid this problem, this application is used to bulk email shot.

Error from after Bounce:
someemail@abc.com wasn't found at abc.com


What I have tried:

C#
MailMessage msg = new MailMessage();
            msg.To.Add(new MailAddress(toEmail, recipientName));
            msg.From = new MailAddress(fromEmail, emailConfig.DisplayName);
            msg.Subject = emailSub;
            emailBody = emailBody.Replace("[Name]", recipientName);
            msg.Body = emailBody;
            //attachments//
            var lst = getTemplateAttachments(templateId);
            foreach (var item in lst)
            {
                byte[] bytes = File.ReadAllBytes(item.FilePath);
                MemoryStream ms = new MemoryStream(bytes);
                Attachment data = new Attachment(ms, item.FileName);
                msg.Attachments.Add(data);

            }

            //attachments//
            msg.IsBodyHtml = true;
            msg.BodyEncoding = System.Text.Encoding.UTF8;
            SmtpClient smtpclient = new SmtpClient();
            smtpclient.UseDefaultCredentials = true;
            smtpclient.Credentials = new System.Net.NetworkCredential(emailConfig.FromEmail, emailConfig.Password);
           
            smtpclient.Port = 587; 
            smtpclient.Host = "smtp.office365.com";
           
            smtpclient.DeliveryMethod = SmtpDeliveryMethod.Network;
            smtpclient.EnableSsl = true;
            
            try
            {
                
                smtpclient.Send(msg);
               
                resp.IsSent = true;
                resp.RespMsg = "success";
                return resp;


            }
            catch (Exception ex)
            {}
Posted
Updated 3-Feb-24 4:49am
v2

We can't do anything about that: if you send a lot of material that MS considers spam (such as but probably not limited to a lot of bounce backs) then they will block your account. It's not a matter of changing your software to avoid it, it's a case of validating your email DB so you have valid email addresses in there.

You may be able to get your site whitelisted with MS - but I doubt it - if you contact them. Most likely you will need to switch to a "bulk sender" email provider, or ask yourself "why do my customers give me invalid email addresses?"

Sorry, but we can't help you.
 
Share this answer
 
Comments
Noman Suleman 3-Feb-24 10:19am    
Yes i know you can't do any thing i just want to ask how mailchimp or other email shooters. shoots bulk emails? without verification of recipient whether email exists or not. they bounce backed it but without block email. need guide so i can implement it.
Thanks for your response.
OriginalGriff 3-Feb-24 11:00am    
They don't block your account because that's their corporate policy: they cater for mass marketing
(including spam) accounts.
The decision to block is at the email service provider end, not the "generate bulk emails" software end.
Dave Kreskowiak 4-Feb-24 1:49am    
There is no way to validate if an email address really exists or not.
OriginalGriff 4-Feb-24 2:26am    
Except to send a "validation required" email and see if they click it.
Even then, in five minutes time it may not exist again ... :D
Dave Kreskowiak 4-Feb-24 13:39pm    
Bingo, and still useless!
For bulk emails, you must also take care of certain restrictions on receiving and sending have been imposed to counteract spam, mass-mailing worms, or viruses. These limits play a crucial role in safeguarding system and ensuring the safety of the users. Check the below link for exchange limit, specially receiving and sending limits section. To adhere to these policies, it is essential to pay attention to the message rate limit, which is set at 30 messages per minute.
Exchange Online limits - Service Descriptions | Microsoft Learn[^]
 
Share this answer
 
Comments
Noman Suleman 4-Feb-24 9:53am    
Yes Ansari i have check already know all these checks. and also implemented especially per minute 30 email restrictions.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900