Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. mail attachment problem(mail box unavailable,The server response was: 5.7.1 Unable to relay)

mail attachment problem(mail box unavailable,The server response was: 5.7.1 Unable to relay)

Scheduled Pinned Locked Moved ASP.NET
helpcomsysadminquestion
8 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MS Lee
    wrote on last edited by
    #1

    Dim SendFrom As MailAddress = New MailAddress(txtFrom.Text) Dim SendTo As MailAddress = New MailAddress(txtTo.Text) Dim MyMessage As MailMessage = New MailMessage(SendFrom, SendTo) MyMessage.Subject = txtSubject.Text MyMessage.Body = txtBody.Text Dim attachFile As New Attachment(txtAttachmentPath.Text) MyMessage.Attachments.Add(attachFile) Dim emailClient As New SmtpClient(txtSMTPServer.Text) emailClient.Send(MyMessage) above is my code, while i run this am getting the below error "mail box unavailable,The server response was: 5.7.1 Unable to relay for murali.sg@gmail.com" is there any solutions..?

    self confidence+hard work=SUCCESS

    B A R 3 Replies Last reply
    0
    • M MS Lee

      Dim SendFrom As MailAddress = New MailAddress(txtFrom.Text) Dim SendTo As MailAddress = New MailAddress(txtTo.Text) Dim MyMessage As MailMessage = New MailMessage(SendFrom, SendTo) MyMessage.Subject = txtSubject.Text MyMessage.Body = txtBody.Text Dim attachFile As New Attachment(txtAttachmentPath.Text) MyMessage.Attachments.Add(attachFile) Dim emailClient As New SmtpClient(txtSMTPServer.Text) emailClient.Send(MyMessage) above is my code, while i run this am getting the below error "mail box unavailable,The server response was: 5.7.1 Unable to relay for murali.sg@gmail.com" is there any solutions..?

      self confidence+hard work=SUCCESS

      B Offline
      B Offline
      Brij
      wrote on last edited by
      #2

      are you getting this error only when you send mail with attachment?

      Cheers!! Brij

      M 1 Reply Last reply
      0
      • B Brij

        are you getting this error only when you send mail with attachment?

        Cheers!! Brij

        M Offline
        M Offline
        MS Lee
        wrote on last edited by
        #3

        yes,but i havent tried without attachment

        self confidence+hard work=SUCCESS

        B 1 Reply Last reply
        0
        • M MS Lee

          Dim SendFrom As MailAddress = New MailAddress(txtFrom.Text) Dim SendTo As MailAddress = New MailAddress(txtTo.Text) Dim MyMessage As MailMessage = New MailMessage(SendFrom, SendTo) MyMessage.Subject = txtSubject.Text MyMessage.Body = txtBody.Text Dim attachFile As New Attachment(txtAttachmentPath.Text) MyMessage.Attachments.Add(attachFile) Dim emailClient As New SmtpClient(txtSMTPServer.Text) emailClient.Send(MyMessage) above is my code, while i run this am getting the below error "mail box unavailable,The server response was: 5.7.1 Unable to relay for murali.sg@gmail.com" is there any solutions..?

          self confidence+hard work=SUCCESS

          A Offline
          A Offline
          Abhijit Jana
          wrote on last edited by
          #4

          MS Lee wrote:

          above is my code, while i run this am getting the below error "mail box unavailable,The server response was: 5.7.1 Unable to relay for murali.sg@gmail.com"

          Error Clearly say's that The mailbox does not exist. Does that mailbox (mailid) exist?

          cheers, Abhijit My Recent Article : Beginner's Guide to ASP.NET Application Folder

          M 1 Reply Last reply
          0
          • A Abhijit Jana

            MS Lee wrote:

            above is my code, while i run this am getting the below error "mail box unavailable,The server response was: 5.7.1 Unable to relay for murali.sg@gmail.com"

            Error Clearly say's that The mailbox does not exist. Does that mailbox (mailid) exist?

            cheers, Abhijit My Recent Article : Beginner's Guide to ASP.NET Application Folder

            M Offline
            M Offline
            MS Lee
            wrote on last edited by
            #5

            Mail id is exists.but it shows the error at mail server(mail box unavailable)

            self confidence+hard work=SUCCESS

            A 1 Reply Last reply
            0
            • M MS Lee

              yes,but i havent tried without attachment

              self confidence+hard work=SUCCESS

              B Offline
              B Offline
              Brij
              wrote on last edited by
              #6

              try once without attachment.I think there is some issue with SmtpClient or user credentials

              Cheers!! Brij

              1 Reply Last reply
              0
              • M MS Lee

                Mail id is exists.but it shows the error at mail server(mail box unavailable)

                self confidence+hard work=SUCCESS

                A Offline
                A Offline
                Abhijit Jana
                wrote on last edited by
                #7

                Does your SMPT Server configure properly ?

                cheers, Abhijit My Recent Article : Beginner's Guide to ASP.NET Application Folder

                1 Reply Last reply
                0
                • M MS Lee

                  Dim SendFrom As MailAddress = New MailAddress(txtFrom.Text) Dim SendTo As MailAddress = New MailAddress(txtTo.Text) Dim MyMessage As MailMessage = New MailMessage(SendFrom, SendTo) MyMessage.Subject = txtSubject.Text MyMessage.Body = txtBody.Text Dim attachFile As New Attachment(txtAttachmentPath.Text) MyMessage.Attachments.Add(attachFile) Dim emailClient As New SmtpClient(txtSMTPServer.Text) emailClient.Send(MyMessage) above is my code, while i run this am getting the below error "mail box unavailable,The server response was: 5.7.1 Unable to relay for murali.sg@gmail.com" is there any solutions..?

                  self confidence+hard work=SUCCESS

                  R Offline
                  R Offline
                  RichardGrimmer
                  wrote on last edited by
                  #8

                  I assume you're attempting to relay through your own GMail account here......that'll never work...Gmail / Hotmail / Yahoo and most of the free ones don't permit relaying (to stop spammers)... You'll need to change the SMTP details (SMTPServer etc) to one that permits relaying.

                  C# has already designed away most of the tedium of C++.

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups