email problem

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
 
R

rowe_newsgroups

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]
 
K

kimiraikkonen

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
 
S

stuforman

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...
 
K

kimiraikkonen

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
 
S

stuforman

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...
 
K

kimiraikkonen

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
 
S

stuforman

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? -
 

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

Top