locked
send email with vb RRS feed

  • Question

  • hello

    im working on a company and we need to send a big ammount of emails, i create a google account but in 10 minutes the account was blocked (it is right know)

    and why?

    because i cant login with the smtp of our domain

    this is the code:

                Dim smtpserver As New SmtpClient
                Dim mail As New MailMessage
    
                smtpserver.EnableSsl = True
               
    
                smtpserver.Credentials = New Net.NetworkCredential("mail", "pw")
                smtpserver.Port = 587
                smtpserver.Host = "smtp.gmail.com"
                mail = New MailMessage
                mail.From = New MailAddress("email")
                mail.To.Add(TextBox1.Text)
                mail.Bcc.Add("anotheremail")
                mail.Subject = ("TEXT")
                mail.Body = (RichTextBox1.Text)
                Dim attachment As System.Net.Mail.Attachment
                attachment = New System.Net.Mail.Attachment(diretorio)
                mail.Attachments.Add(attachment)
    
                smtpserver.Send(mail)

    how can i login with our smtp, make the authentication, or does anyone knows other way to do it

    tks!


    Monday, April 27, 2015 5:20 PM

Answers

  • Hello,

    Beings you are looking to send a large amount of messages then you will need a paid provider that permits this or (and this is not advised as it may fail down the road), figure out how many messages may be sent in a timeframe and how much time in between then write code that sends x amount of messages according to the rules of the provider.

    Our company has our own provider so I can send 1000 messages plus with no restrictions.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my webpage under my profile but do not reply to forum questions.

    • Proposed as answer by Paul Ishak Monday, April 27, 2015 10:51 PM
    • Marked as answer by Carl Cai Wednesday, May 6, 2015 9:58 AM
    Monday, April 27, 2015 7:10 PM
  • I don't see any benefit for using this library in regards to the current issue. You need a provider that allows you to send mass email messages.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my webpage under my profile but do not reply to forum questions.

    • Marked as answer by Carl Cai Wednesday, May 6, 2015 9:58 AM
    Tuesday, April 28, 2015 11:29 AM
  • RESOLVED usint aegisimplicitmail

    thank you all people!

    have a nice day


    • Edited by Ko0kiE Tuesday, April 28, 2015 2:18 PM
    • Marked as answer by Carl Cai Wednesday, May 6, 2015 9:59 AM
    Tuesday, April 28, 2015 2:09 PM

All replies

  • You use the Google Smtp server. You have to use the mailserver from your company.

    Be aware that you in most countries can sent a limit quantity of mails to known accounts. 

    As soon as it becomes more, you are in many countries doing a crime (spam) with jail penalties.


    Success
    Cor



    Monday, April 27, 2015 5:28 PM
  • is using smtp.gmail because i was sent from a google account
    Monday, April 27, 2015 5:36 PM
  • is using smtp.gmail because i was sent from a google account

    How was the journey?

    Armin

    Monday, April 27, 2015 5:38 PM
  • ahahah!! good one

    it was i little BIT boring

    i was sending from a google account

    Monday, April 27, 2015 5:50 PM
  • i already tried with the smtp of my company but nothing happens because authentication or the certificate maybe

    how can i login with outlook on vb?

    about outlook i have this:

     Dim oOut As New Microsoft.Office.Interop.Outlook.Application
                Dim mitem As Microsoft.Office.Interop.Outlook.MailItem = oOut.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem)
                mail = ComboBox5.Items(j)

                mitem.HTMLBody = html.ToString
                mitem.To = mail
                mitem.Send()
                mitem.att()
                mail = ""

    but it uses the account on the machine and i have to send the email from a specific acount

    Monday, April 27, 2015 6:12 PM
  • Is Cor right?

    Which exact exception message do you get?


    Armin

    Monday, April 27, 2015 6:16 PM
  • my exception message that it says that it wasn't possible to connnect

    Monday, April 27, 2015 6:52 PM
  • Hello,

    Beings you are looking to send a large amount of messages then you will need a paid provider that permits this or (and this is not advised as it may fail down the road), figure out how many messages may be sent in a timeframe and how much time in between then write code that sends x amount of messages according to the rules of the provider.

    Our company has our own provider so I can send 1000 messages plus with no restrictions.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my webpage under my profile but do not reply to forum questions.

    • Proposed as answer by Paul Ishak Monday, April 27, 2015 10:51 PM
    • Marked as answer by Carl Cai Wednesday, May 6, 2015 9:58 AM
    Monday, April 27, 2015 7:10 PM
  • my exception message that it says that it wasn't possible to connnect

    I wouldn't call this the excact exception message. An exception can also have an inner exception. But I can't help anyway if it's a restriction at the provider's side.


    Armin

    Monday, April 27, 2015 7:39 PM
  • i would like to use outlook login data instead of use a gmail account, how can i do that?
    Tuesday, April 28, 2015 8:08 AM
  • I don't know the current state, but some virusscanners and or firewalls did not allow to connect to the local (LAN) smtpmailserver

    Success
    Cor

    Tuesday, April 28, 2015 8:23 AM
  • i will give it a shot, i've got try anything, because we really need this projet , we need to inform our clients about the prices of the fuel, and we need to do it by email every monday, our IP was blocked this morning and yesterday and today, our google account i've blocked twice, im open to sugetions, 

    i search in the internet i saw somethnig about mail man2 but i dont understanding, do you know wut it is?


    • Edited by Ko0kiE Tuesday, April 28, 2015 8:52 AM
    Tuesday, April 28, 2015 8:48 AM
  • ok, so i've been searching and i found this:

    https://www.nuget.org/packages/AIM

    its some kind of service to send mail like system.net.mail

    i've been trying this code on vb.net but without sucess, any help?

    http://sourceforge.net/p/netimplicitssl/wiki/Home/

    Tuesday, April 28, 2015 10:28 AM
  • I don't see any benefit for using this library in regards to the current issue. You need a provider that allows you to send mass email messages.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my webpage under my profile but do not reply to forum questions.

    • Marked as answer by Carl Cai Wednesday, May 6, 2015 9:58 AM
    Tuesday, April 28, 2015 11:29 AM
  • hi, the problem is not in the provider but in one line of code to allow to the program to connect to the server

    its necessary a authentication

    Tuesday, April 28, 2015 11:53 AM
  • hi, the problem is not in the provider but in one line of code to allow to the program to connect to the server

    its necessary a authentication


    You won't get any help as long as you still refuse to post the exact exception message.

    Armin

    Tuesday, April 28, 2015 12:09 PM
  • is that on the output?
    Tuesday, April 28, 2015 12:13 PM
  • RESOLVED usint aegisimplicitmail

    thank you all people!

    have a nice day


    • Edited by Ko0kiE Tuesday, April 28, 2015 2:18 PM
    • Marked as answer by Carl Cai Wednesday, May 6, 2015 9:59 AM
    Tuesday, April 28, 2015 2:09 PM