Error sending mail when outlook is using Exchange server

  • Thread starter Thread starter Richard Kure
  • Start date Start date
R

Richard Kure

I encountered a problem sending an email on my windows XP, which I thought
was a bit weird, cause it worked for me before on windows XP.
So I tried on some other computers with windows XP, and managed to send
emails on the systems where outlook was not installed.

So I'm pretty sure the problem lies in outlook using exchange server.

Does anyone know how to solve this, maybe send the mail to the exchange
server or outlook instead. I dont wanna use the outlook dll file, like this

Dim outlookApp As Outlook._Application
outlookApp = New Outlook.Application

That is not an acceptable solution, any other ways to work around the
problem, or solve the problem?
 
Richard said:
Does anyone know how to solve this, maybe send the mail to the exchange
server or outlook instead. I dont wanna use the outlook dll file, like this

Look into the System.Net.Mail class (.NET 2.0) or System.Web.Mail (.NET
1.x). To send mail through those classes you just need to specify an
SMTP server, which would be the Exchange server.

Hope this helps.

Dan Manges
 
Look into the System.Net.Mail class (.NET 2.0) or System.Web.Mail (.NET
1.x). To send mail through those classes you just need to specify an SMTP
server, which would be the Exchange server.

I have tried to use both namespaces, but it wont send the emails. If I try
on a windows XP without outlook installed, there is no problem, then I can
send the emails as I want to. the problem only occurs when outlook is
installed and linked to exchange server.
 
This is what I cannot do, when I have installed outlook and linked it to an
exchange server:

Dim mailMessage As New MailMessage()

mailMessage.To.Add(textBoxTo.Text)

mailMessage.From = New MailAddress(textBoxFrom.Text)

mailMessage.Subject = "test"

mailMessage.Body = "test"

Dim smtpClient As New SmtpClient(textBoxSMTP.Text)

smtpClient.Send(mailMessage)



(System.Net.Mail) I also tried with the (System.Web.Mail).
 
Richard said:
This is what I cannot do, when I have installed outlook and linked it to an
exchange server:

Dim mailMessage As New MailMessage()
mailMessage.To.Add(textBoxTo.Text)
mailMessage.From = New MailAddress(textBoxFrom.Text)
mailMessage.Subject = "test"
mailMessage.Body = "test"
Dim smtpClient As New SmtpClient(textBoxSMTP.Text)
smtpClient.Send(mailMessage)

(System.Net.Mail) I also tried with the (System.Web.Mail).

Now I understand your problem. That's odd that after installing Outlook
you can't send mail this way. I don't know very much about Outlook. My
only guess is that it installs something which prevents applications
from sending mail directly as a way to prevent viruses which send spam,
but I really have no idea.

Sorry I can't be of more help.

Dan Manges
 
Richard Kure said:
I encountered a problem sending an email on my windows XP, which I thought
was a bit weird, cause it worked for me before on windows XP.
So I tried on some other computers with windows XP, and managed to send
emails on the systems where outlook was not installed.

So I'm pretty sure the problem lies in outlook using exchange server.

Does anyone know how to solve this, maybe send the mail to the exchange
server or outlook instead. I dont wanna use the outlook dll file, like
this

Dim outlookApp As Outlook._Application
outlookApp = New Outlook.Application

That is not an acceptable solution, any other ways to work around the
problem, or solve the problem?

DOH, I figurred out the problem, apparently McAfee has a default setting,
stoppin all outgoing emails, this took me 2 days, but by a process of
elimination, i managed to find out that it was McAfee which blocked my
mails.
 
Back
Top