Quantcast
Channel: Getting Started
Viewing all articles
Browse latest Browse all 12

problem in mass mailer

$
0
0

Hello, i've created a mass mailer (the hosted server is rediff) which works completely fine. It fetches all emails in database & add them in BCC field.All the recepients are in BCC field as i dont want to send new mail for each recepient as well as due to email id safety.

Now there are two problems:

  1. if it finds any bad email if stops the complete function. Though i scanned the whole database for bad mail & now the program is running fine but i cannot do this everyday, so i want a method which handles this problem withour manual checking.
  2. 2nd problem is, if the number of recepients is very large it do not send mail & gives error"Unable to send mail to a(all) receipients"

I want to do:

  1. if it finds any bad email in BCC section it should send email to other recepients atleast which fulfill the criteria of good email
  2. how to send emails to large number of recipients (i dont want to send them in short groups)

Pls give this problem some of your precious time if anyone knows the solution. the code for "Send" button is attached here:

 Dim useremail As Object, strmessage As New StringBuilder
 Dim i As Integer = 0
 Dim mail As New System.Net.Mail.MailMessage, mess As String


 mail.Priority = MailPriority.High
 mail.From = New MailAddress(ddlfromid.SelectedValue & "@" &  ddlfromdomain.SelectedValue)
            mail.To.Add(New MailAddress(txtto.Text))
            mail.Bcc.Add(txtbcc.Text)
            mail.Subject = txtsubject.Text


            strmessage.Append("<html><body style='color:Navy;text-transform:capitalize;'>")
            strmessage.Append("<p><b></b> " & Trim(mess) & "</p>")
            strmessage.Append("</html></body>")
            mail.Body = strmessage.ToString
            mail.IsBodyHtml = True
            Dim smtp As New System.Net.Mail.SmtpClient("localhost")
            smtp.Send(mail)
            clear()
            lblerror.Text = "Mail Sent Successfully To Selected Recipients."


 


Viewing all articles
Browse latest Browse all 12

Latest Images

Trending Articles





Latest Images