Results 1 to 4 of 4

Thread: emailing problem??

  1. #1

    Thread Starter
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018

    emailing problem??

    REF:Windows application in VB.net

    I have added areference to the system.web.dll but whenever I add

    Imports System.Web.Mail

    to the top of my page the "imports" section ends up with a wavy blue line underneath it.
    I take it this means there is a problem.

    Can anyone help?

    Parksie

  2. #2

    Thread Starter
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018
    By moving the Imports line to the very top of my page, above public class form I have solved that problem but now I find that while my code for sending an email does not throw up any errors It does not send the email either.


    Any ideas?
    Heres the code:

    Dim mm As New MailMessage()
    mm.From = "[email protected]"
    mm.To = "[email protected]"
    mm.Priority = MailPriority.High
    mm.Subject = "Reorder Notification"
    mm.Body = "The following stock items require reordering:" & vbCrLf & vbCrLf & myMessage
    SmtpMail.Send(mm)

    Parksie

  3. #3
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    what properties did you set for what smtp server to conenct to? Make sure that is correct. And double check your email address you are sending to. and probably from as I believe you need a valid from mail account as defined on the smtp server you connect to.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  4. #4
    Member
    Join Date
    Sep 2002
    Location
    Cincinnati, OH
    Posts
    44
    Go To: http://www.jamesrking.com/left_brain...ding_email.asp

    I used the link above for info and setup email through vb and it works great.
    Jim Webster

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width