mail doesn't work on vista business

S

Scott Baxter

Hello,

I wrote a program to send email in visual studio 2005. It worked fine on
xp.

I put the prog in visual studio 2008. and it appears to work. but the mail
never gets sent ( or recieved)

Can anyone tell me a problem? I'm using Windows Mail on the machine.

Here's the code I'm using:

Dim credential As Net.NetworkCredential = New Net.NetworkCredential
credential.UserName = our_username
credential.Password = our_password
'Now we 've got everything we need to send the email except an SMTP server.
To create that just create a new instance of SmtpClient.
Dim client As New Net.Mail.SmtpClient()
'First we need to set up which SMTP server that the SMTP Client needs to
use
client.Host = client_host
client.UseDefaultCredentials = False
client.Credentials = credential
Dim msg As New MailMessage(our_from_email, one_to_use)
msg.From = New MailAddress(our_from_email2, our_company_name)
msg.Subject = our_subject
msg.IsBodyHtml = True
msg.Body = "body of email"
client.Send(msg)
msg = Nothing
Application.DoEvents()

Thanks for any help.

Scott
 
S

Scott Baxter

Hello ,

I solved it.

Windows mail was putting my email in the 'junk email folder'.

Thanks.

Scott
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

mailer question 2
mailer doesn't send till program ends 3
smtp mail 1
SMTP IN VB.NET HELP 1
exception 2
SmtpClient Email Error 1
VB Net 2005 and Email! 2
SMTPClient Message.Send Error - please help!!! 3

Top