email problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • stuforman

    #1

    email problem

    I am attempting to send an email attachment out

    Dim messageTo As String = "name@something .com"
    Dim messageFrom As String = "name@something .com"
    Dim msgSubject As String = "check confirm"
    Dim msgBody As String = "please find the text attachment"
    Dim Msg As New MailMessage(mes sageFrom, messageTo, msgSubject,
    msgBody)
    Dim MailClient As New SmtpClient("### .#.#.##")
    Dim attach1 As New Attachment("c:\ windows\temp\ch eckTest.txt")
    Msg.Attachments .Add(attach1)
    MailClient.UseD efaultCredentia ls = 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
  • rowe_newsgroups

    #2
    Re: email problem

    On Jun 13, 1:46 pm, stuforman <stufor...@gmai l.comwrote:
    I am attempting to send an email attachment out
    >
    Dim messageTo As String = "n...@something .com"
    Dim messageFrom As String = "n...@something .com"
    Dim msgSubject As String = "check confirm"
    Dim msgBody As String = "please find the text attachment"
    Dim Msg As New MailMessage(mes sageFrom, messageTo, msgSubject,
    msgBody)
    Dim MailClient As New SmtpClient("### .#.#.##")
    Dim attach1 As New Attachment("c:\ windows\temp\ch eckTest.txt")
    Msg.Attachments .Add(attach1)
    MailClient.UseD efaultCredentia ls = 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]

    Comment

    • kimiraikkonen

      #3
      Re: email problem

      On Jun 13, 8:46 pm, stuforman <stufor...@gmai l.comwrote:
      I am attempting to send an email attachment out
      >
              Dim messageTo As String = "n...@something .com"
              Dim messageFrom As String = "n...@something .com"
              Dim msgSubject As String = "check confirm"
              Dim msgBody As String = "please find the text attachment"
              Dim Msg As New MailMessage(mes sageFrom, messageTo, msgSubject,
      msgBody)
              Dim MailClient As New SmtpClient("### .#.#.##")
              Dim attach1 As New Attachment("c:\ windows\temp\ch eckTest.txt")
              Msg.Attachments .Add(attach1)
              MailClient.UseD efaultCredentia ls = 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

      Comment

      • stuforman

        #4
        Re: email problem

        On Jun 13, 2:03 pm, kimiraikkonen <kimiraikkone.. .@gmail.comwrot e:
        On Jun 13, 8:46 pm, stuforman <stufor...@gmai l.comwrote:
        >
        >
        >
        >
        >
        I am attempting to send an email attachment out
        >
                Dim messageTo As String = "n...@something .com"
                Dim messageFrom As String = "n...@something .com"
                Dim msgSubject As String = "check confirm"
                Dim msgBody As String = "please find the text attachment"
                Dim Msg As New MailMessage(mes sageFrom, messageTo, msgSubject,
        msgBody)
                Dim MailClient As New SmtpClient("### .#.#.##")
                Dim attach1 As New Attachment("c:\ windows\temp\ch eckTest..txt")
                Msg.Attachments .Add(attach1)
                MailClient.UseD efaultCredentia ls = 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- 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...

        Comment

        • kimiraikkonen

          #5
          Re: email problem

          On Jun 13, 9:16 pm, stuforman <stufor...@gmai l.comwrote:
          On Jun 13, 2:03 pm, kimiraikkonen <kimiraikkone.. .@gmail.comwrot e:
          >
          >
          >
          >
          >
          On Jun 13, 8:46 pm, stuforman <stufor...@gmai l.comwrote:
          >
          I am attempting to send an email attachment out
          >
                  Dim messageTo As String = "n...@something .com"
                  Dim messageFrom As String = "n...@something .com"
                  Dim msgSubject As String = "check confirm"
                  Dim msgBody As String = "please find the text attachment"
                  Dim Msg As New MailMessage(mes sageFrom, messageTo, msgSubject,
          msgBody)
                  Dim MailClient As New SmtpClient("### .#.#.##")
                  Dim attach1 As New Attachment("c:\ windows\temp\ch eckTest.txt")
                  Msg.Attachments .Add(attach1)
                  MailClient.UseD efaultCredentia ls = 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- 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...- 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

          Comment

          • stuforman

            #6
            Re: email problem

            On Jun 13, 2:49 pm, kimiraikkonen <kimiraikkone.. .@gmail.comwrot e:
            On Jun 13, 9:16 pm, stuforman <stufor...@gmai l.comwrote:
            >
            >
            >
            >
            >
            On Jun 13, 2:03 pm, kimiraikkonen <kimiraikkone.. .@gmail.comwrot e:
            >
            On Jun 13, 8:46 pm, stuforman <stufor...@gmai l.comwrote:
            >
            I am attempting to send an email attachment out
            >
                    Dim messageTo As String = "n...@something .com"
                    Dim messageFrom As String = "n...@something .com"
                    Dim msgSubject As String = "check confirm"
                    Dim msgBody As String = "please find the text attachment"
                    Dim Msg As New MailMessage(mes sageFrom, messageTo, msgSubject,
            msgBody)
                    Dim MailClient As New SmtpClient("### .#.#.##")
                    Dim attach1 As New Attachment("c:\ windows\temp\ch eckTest.txt")
                    Msg.Attachments .Add(attach1)
                    MailClient.UseD efaultCredentia ls = 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- 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...- 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- 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...

            Comment

            • kimiraikkonen

              #7
              Re: email problem

              On Jun 13, 10:04 pm, stuforman <stufor...@gmai l.comwrote:
              On Jun 13, 2:49 pm, kimiraikkonen <kimiraikkone.. .@gmail.comwrot e:
              >
              >
              >
              >
              >
              On Jun 13, 9:16 pm, stuforman <stufor...@gmai l.comwrote:
              >
              On Jun 13, 2:03 pm, kimiraikkonen <kimiraikkone.. .@gmail.comwrot e:
              >
              On Jun 13, 8:46 pm, stuforman <stufor...@gmai l.comwrote:
              >
              I am attempting to send an email attachment out
              >
                      Dim messageTo As String = "n...@something .com"
                      Dim messageFrom As String = "n...@something .com"
                      Dim msgSubject As String = "check confirm"
                      Dim msgBody As String = "please find the text attachment"
                      Dim Msg As New MailMessage(mes sageFrom, messageTo,msgSu bject,
              msgBody)
                      Dim MailClient As New SmtpClient("### .#.#.##")
                      Dim attach1 As New Attachment("c:\ windows\temp\ch eckTest.txt")
                      Msg.Attachments .Add(attach1)
                      MailClient.UseD efaultCredentia ls = 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- 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...- 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- 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...- 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

              Comment

              • stuforman

                #8
                Re: email problem

                On Jun 13, 3:29 pm, kimiraikkonen <kimiraikkone.. .@gmail.comwrot e:
                On Jun 13, 10:04 pm, stuforman <stufor...@gmai l.comwrote:
                >
                >
                >
                >
                >
                On Jun 13, 2:49 pm, kimiraikkonen <kimiraikkone.. .@gmail.comwrot e:
                >
                On Jun 13, 9:16 pm, stuforman <stufor...@gmai l.comwrote:
                >
                On Jun 13, 2:03 pm, kimiraikkonen <kimiraikkone.. .@gmail.comwrot e:
                >
                On Jun 13, 8:46 pm, stuforman <stufor...@gmai l.comwrote:
                >
                I am attempting to send an email attachment out
                >
                        Dim messageTo As String = "n...@something .com"
                        Dim messageFrom As String = "n...@something .com"
                        Dim msgSubject As String = "check confirm"
                        Dim msgBody As String = "please find the text attachment"
                        Dim Msg As New MailMessage(mes sageFrom, messageTo, msgSubject,
                msgBody)
                        Dim MailClient As New SmtpClient("### .#.#.##")
                        Dim attach1 As New Attachment("c:\ windows\temp\ch eckTest.txt")
                        Msg.Attachments .Add(attach1)
                        MailClient.UseD efaultCredentia ls = 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- 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...- 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- 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...- 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- 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? -

                Comment

                Working...