Results 1 to 3 of 3

Thread: Hello can Any one Tell Me.

  1. #1
    Junior Member
    Join Date
    Jul 2007
    Answers
    15

    Hello can Any one Tell Me.

    How to send Email through vb.net?


  2. #2
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: Hello can Any one Tell Me.

    Kindly post what you have tried for this.


  3. #3
    Junior Member
    Join Date
    Dec 2007
    Answers
    18

    Re: Hello can Any one Tell Me.

    The SmtpMail class can be used to send mails from your VB application. Mail is by default queued on the system, ensuring that the calling program does not block network traffic. The SmtpMail class is defined in the namespace System.Web.Mail. You need to call

    Imports System.Web.Mail

    before you use SmtpMail. This class has only one member function Send. Send sends a mail message. The Send method is overloaded. Either a MailMessage class or four arguments can be passed to the Send message. You can call the Send method in two manners:

    SmtpMail.Send(txtFrom.Text, txtTo.Text, txtSubject.Text, txtMessage.Text)

    Or, if you don't want to call System.Web.Util.

    System.Web.Mail.SmptMail.Send(fromString, toString, SubjeOfTheMailString, MessageOfTheMailString)

    You can call the Send method in two ways.

    1. By passing MailMessage as a parameter,
    Code:
    public static void Send(MailMessage).
    
    Here MailMessage is a class.
    
    Private mailMsg As MailMessage = New MailMessage()
    Private mailMsg.From = from@fromServer.com
    Private mailMsg.To = to@toServer.com
    Private mailMsg.Cc = cc@ccServer.com"
    Private mailMsg.Bcc = bcc@bccServer.com
    Private mailMsg.Subject = "SubjectOfTheMailString"
    Private mailMsg.Body = "BodyOfTheMailString"
    SmtpMail.Send(mailMsg).



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact