how to send email - using vb.net - please help.


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: how to send email - using vb.net - please help.

Hybrid View

  1. #1
    Join Date
    Aug 2007
    Posts
    30

    how to send email - using vb.net - please help.

    Hi, Please help me with sending an email (asp.net / vb.net)
    I have 2 listbox (Type and Scope). Types values are 'IT' and 'MIS'. When a user select 'IT', then 'network' and 'server' are shown in "Scope ListBox" and when a User selects 'MIS' ,then 'Cubes' and 'Crystal Reports' is shown in "Scope Listbox".
    After the user selects and click on save Button , it should send an email to the user and to the IT dept.For example , If a user selects IT/NETWORK THEN IT SHOULD SEND AN EMAIL TO 'SAB' FROM IT DEPT WHOSE EMAIL ID IS 'SABA@YAHOO.COM' AS WELL AS TO THE USER.
    If User_level is 'I' then its a person from 'IT Dept' , 'II' is a 'normal User'(see Table B).Here am using Session variable to capture the User Id from login page. See Table Below.

    Code:
    TABLE A:
    TYPE_LABEL  SCOPE_LABEL      SCOPE_ADMIN
    ------------------------------------------
    IT	    NETWORK	         SAB
    IT	    SERVER	         NULL
    MIS	    CUBES	         VIN
    MIS	    CRYSTAL REPORTS	 SIA
    Code:
    TABLE B:
    USER_ID       USER_NAME      	USER_EMAIL         USER_LEVEL
    -------------------------------------------------------------
    SAB		SABA	 	saba@yahoo.com		I
    YIL		YILIN		yilin@yahoo.com		I
    VIN		VINA		vina@yahoo.com		I
    SIA		SIAM		siam@yahoo.com		I
    ZZZ		ZEAN		zean@yahoo.com		II
    Please help me with this how to send an email with coding in vb.net.
    Thanks in advance.. Let me know if u have any queries.

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    You may find this site helpful: http://www.systemnetmail.com/
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  3. #3
    Join Date
    Oct 2004
    Location
    Bangalore, India
    Posts
    47

    Sending emails from ASP.Net page

    Hi



    <%@Import Namespace="System.Net.Mail" %>

    String strHTMLBody;

    strHTMLBody = "<html><head><title>Confirm your registration.</title></head><body>Congratulations ! You have successfully completed registration.<br /><br />Now you need to confirm your registration.<br /><br />To confirm your registration, click on the link : <A HREF=" + sFullURL + " >" + URLText + "</A><br /><br />Regards,<br />From the team at Jobs</body></html> ";


    MailMessage oMessage = new MailMessage();
    oMessage.Subject = "Confirm your registration. Jobs";
    oMessage.Body = strHTMLBody;
    oMessage.IsBodyHtml = true;
    oMessage.From = new MailAddress("jobs@jo.com");
    oMessage.To.Add(new MailAddress(txtEmail.Text));
    oMessage.Priority = MailPriority.High;

    SmtpClient client = new SmtpClient("smtp.XXXX.com");
    // your mail server

    client.UseDefaultCredentials = true;
    client.Send(oMessage);


    DEvelop your Web accounting application using asp.net

Similar Threads

  1. Send message to pager from VB.Net
    By Nenad Kermeci in forum .NET
    Replies: 4
    Last Post: 08-07-2002, 09:53 PM
  2. Send Raw data to printer using vb.net
    By estrella in forum .NET
    Replies: 0
    Last Post: 07-19-2002, 05:19 PM
  3. Send Email ????
    By Paul in forum VB Classic
    Replies: 0
    Last Post: 03-11-2001, 09:45 PM
  4. Exchange wont send internet email
    By Aazzin in forum Enterprise
    Replies: 2
    Last Post: 08-11-2000, 03:27 PM
  5. Send email with another user's email ID.
    By nlw in forum Enterprise
    Replies: 1
    Last Post: 06-22-2000, 04:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center