email problem

  • Thread starter Thread starter stuforman
  • Start date Start date
S

stuforman

I am attempting to send an email attachment out

Dim messageTo As String = "(e-mail address removed)"
Dim messageFrom As String = "(e-mail address removed)"
Dim msgSubject As String = "check confirm"
Dim msgBody As String = "please find the text attachment"
Dim Msg As New MailMessage(messageFrom, messageTo, msgSubject,
msgBody)
Dim MailClient As New SmtpClient("###.#.#.##")
Dim attach1 As New Attachment("c:\windows\temp\checkTest.txt")
Msg.Attachments.Add(attach1)
MailClient.UseDefaultCredentials = True
MailClient.Send(Msg)
Msg.Dispose()

I get an error "the operation has timed out"

Any ideas of what i'm doing wrong/missing?

thanks for any assistance,

Stu
 
I am attempting to send an email attachment out

Dim messageTo As String = "(e-mail address removed)"
Dim messageFrom As String = "(e-mail address removed)"
Dim msgSubject As String = "check confirm"
Dim msgBody As String = "please find the text attachment"
Dim Msg As New MailMessage(messageFrom, messageTo, msgSubject,
msgBody)
Dim MailClient As New SmtpClient("###.#.#.##")
Dim attach1 As New Attachment("c:\windows\temp\checkTest.txt")
Msg.Attachments.Add(attach1)
MailClient.UseDefaultCredentials = True
MailClient.Send(Msg)
Msg.Dispose()

I get an error "the operation has timed out"

Any ideas of what i'm doing wrong/missing?

thanks for any assistance,

Stu

Which line is timing out?

Thanks,

Seth Rowe [MVP]
 
I am attempting to send an email attachment out

        Dim messageTo As String = "(e-mail address removed)"
        Dim messageFrom As String = "(e-mail address removed)"
        Dim msgSubject As String = "check confirm"
        Dim msgBody As String = "please find the text attachment"
        Dim Msg As New MailMessage(messageFrom, messageTo, msgSubject,
msgBody)
        Dim MailClient As New SmtpClient("###.#.#.##")
        Dim attach1 As New Attachment("c:\windows\temp\checkTest.txt")
        Msg.Attachments.Add(attach1)
        MailClient.UseDefaultCredentials = True
        MailClient.Send(Msg)
        Msg.Dispose()

I get an error "the operation has timed out"

Any ideas of what i'm doing wrong/missing?

thanks for any assistance,

Stu

Are you sure that the SMTP server you're using is healty and
responsive? A good test would use the same SMTP server with Outlook
Express to determine if it's a server issue.

Thanks,

Onur Güzel
 
Are you sure that the SMTP server you're using is healty and
responsive? A good test would use the same SMTP server with Outlook
Express to determine if it's a server issue.

Thanks,

Onur Güzel- Hide quoted text -

- Show quoted text -

the line that times out is:
MailClient.Send(Msg)

my first thougth is that it is a server issue somehow - but, i have 2
other programs (NOT VB) that use this server. I also was emailing
through visual studios in the error event handler for several SSIS'.
All these use this same IP address for the server...

I'm fairly new to VB, so I was questioning whether it is the server or
my syntax...
 
the line that times out is:
MailClient.Send(Msg)

my first thougth is that it is a server issue somehow - but, i have 2
other programs (NOT VB) that use this server. I also was emailing
through visual studios in the error event handler for several SSIS'.
All these use this same IP address for the server...

I'm fairly new to VB, so I was questioning whether it is the server or
my syntax...- Hide quoted text -

- Show quoted text -

Try to set SMTPClient's EnableSSL property to True and also see if
Port property is required to set a value if you know which port to
use.

Thanks,

Onur Güzel
 
Try to set SMTPClient's EnableSSL property to True and also see if
Port property is required to set a value if you know which port to
use.

Thanks,

Onur Güzel- Hide quoted text -

- Show quoted text -

i tried to set the SMTPClient's EnableSSL property to True and i get
an error that the server does not support secure connections...
 
i tried to  set the SMTPClient's EnableSSL property to True and i get
an error that the server does not support secure connections...- Hide quoted text -

- Show quoted text -

Ok.. Another possibility, do you have any firewalls turned on? Such as
Windows Firewall or Norton or McAfee, disable them temporarily and re-
test the behaviour.

Hope this helps,

Onur Güzel
 
Ok.. Another possibility, do you have any firewalls turned on? Such as
Windows Firewall or Norton or McAfee, disable them temporarily and re-
test the behaviour.

Hope this helps,

Onur Güzel- Hide quoted text -

- Show quoted text -

i don't know if this is better or not... i tried a different IP
address - and am now receiving an error:

mailbiox name not allowed. the server response was: the sender is
spoofed...

i guess i am spoofing myself - but ... ideas of what i can do? -
 
Back
Top