How to send mail different domain users in VB.NET

10 pts.
Tags:
SMTP server
VB.NET
Visual Basic
how to send mail different domain users in VB.Net

Answer Wiki

Thanks. We'll let you know when a new response is added.

I need more information. Are the domains able to talk to each other?

Discuss This Question: 5  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • jayantsupercop
    i want to send mail from  multiple domain (eg. gmail, rediff, etc.)    to other multiple domain(eg . rediff,gmail etc.)
    50 pointsBadges:
    report
  • jayantsupercop
    I am able to send mail from gmail to gmail whose code is given below
    I want to send from different domain to different domain
    Imports System.Net.Mail
    Imports System.IO

     Dim smtpServer As New SmtpClient()
            Dim mail As New MailMessage
            smtpServer.Credentials = New Net.NetworkCredential(TextBox1.Text & "@gmail.com", TextBox2.Text)
            smtpServer.Port = 587
            smtpServer.Host = "smtp.gmail.com"
            smtpServer.EnableSsl = True
            mail.From = New MailAddress(TextBox1.Text & "@gmail.com")
            If RadioButton1.Checked = True Then
                mail.To.Add("91" & TextBox3.Text & "@m3m.in") 'sms
            ElseIf RadioButton2.Checked = True Then
                mail.To.Add(TextBox3.Text) 'mail
            End If
            mail.Subject = TextBox4.Text
            mail.Body = TextBox5.Text()
            smtpServer.Send(mail)
            MsgBox("mail is sent", MsgBoxStyle.OkOnly, "Report")
    50 pointsBadges:
    report
  • jayantsupercop
    if i use if then clause then i am unable to do it. what shoud i do with it

    50 pointsBadges:
    report
  • jayantsupercop
    no these these  domains does not talk with each other

    50 pointsBadges:
    report
  • jayantsupercop
    only gmail talk with gmail

    50 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following