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. how to send mail using exchange mail server

how to send mail using exchange mail server

Scheduled Pinned Locked Moved ASP.NET
sysadmintutorialquestionannouncement
7 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.
  • S Offline
    S Offline
    SwastikInfosystems
    wrote on last edited by
    #1

    HellO Friends!!!!!!! I have written the following code to send mail using exchange mail server MailMessage mail = new MailMessage(pMailForm, pMailTo); mail.Subject = pSubject; mail.Body = pBody; mail.IsBodyHtml = true; mail.Priority = MailPriority.High; SmtpClient smtp = new SmtpClient(); smtp.Host = "MailServerName"; smtp.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis; smtp.Send(mail); but I can not send mail what I need to update in code?

    J E C 3 Replies Last reply
    0
    • S SwastikInfosystems

      HellO Friends!!!!!!! I have written the following code to send mail using exchange mail server MailMessage mail = new MailMessage(pMailForm, pMailTo); mail.Subject = pSubject; mail.Body = pBody; mail.IsBodyHtml = true; mail.Priority = MailPriority.High; SmtpClient smtp = new SmtpClient(); smtp.Host = "MailServerName"; smtp.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis; smtp.Send(mail); but I can not send mail what I need to update in code?

      J Offline
      J Offline
      J4amieC
      wrote on last edited by
      #2

      SwastikInfosystems wrote:

      smtp.Host = "MailServerName";

      How about changing this for your actual mail server name? You've given us nothing else to go on.... no error information... nothing, just a standard bit of code where were magically meant to know what's wrong.

      1 Reply Last reply
      0
      • S SwastikInfosystems

        HellO Friends!!!!!!! I have written the following code to send mail using exchange mail server MailMessage mail = new MailMessage(pMailForm, pMailTo); mail.Subject = pSubject; mail.Body = pBody; mail.IsBodyHtml = true; mail.Priority = MailPriority.High; SmtpClient smtp = new SmtpClient(); smtp.Host = "MailServerName"; smtp.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis; smtp.Send(mail); but I can not send mail what I need to update in code?

        E Offline
        E Offline
        eyeseetee
        wrote on last edited by
        #3

        you have blatently just copied this from the internet and not adapted it at all for your own use, try applying your own knowledge to the code then post on this forum

        S 1 Reply Last reply
        0
        • E eyeseetee

          you have blatently just copied this from the internet and not adapted it at all for your own use, try applying your own knowledge to the code then post on this forum

          S Offline
          S Offline
          SwastikInfosystems
          wrote on last edited by
          #4

          thank your for ur opinion .netman If you have any suggestion please tell, otherwise do not use ur brain.

          modified on Thursday, March 27, 2008 7:09 AM

          J E 2 Replies Last reply
          0
          • S SwastikInfosystems

            thank your for ur opinion .netman If you have any suggestion please tell, otherwise do not use ur brain.

            modified on Thursday, March 27, 2008 7:09 AM

            J Offline
            J Offline
            J4amieC
            wrote on last edited by
            #5

            SwastikInfosystems wrote:

            If you have any suggestion please tell, otherwise do not use ur brain.

            Besed on the fact you use offensive language and iconography, you sir will not be getting any more help from me.

            1 Reply Last reply
            0
            • S SwastikInfosystems

              thank your for ur opinion .netman If you have any suggestion please tell, otherwise do not use ur brain.

              modified on Thursday, March 27, 2008 7:09 AM

              E Offline
              E Offline
              eyeseetee
              wrote on last edited by
              #6

              SwastikInfosystems wrote:

              otherwise do not use ur brain.

              I think the irony here is if you had used your brain you would have solved your problem

              1 Reply Last reply
              0
              • S SwastikInfosystems

                HellO Friends!!!!!!! I have written the following code to send mail using exchange mail server MailMessage mail = new MailMessage(pMailForm, pMailTo); mail.Subject = pSubject; mail.Body = pBody; mail.IsBodyHtml = true; mail.Priority = MailPriority.High; SmtpClient smtp = new SmtpClient(); smtp.Host = "MailServerName"; smtp.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis; smtp.Send(mail); but I can not send mail what I need to update in code?

                C Offline
                C Offline
                Christian Graus
                wrote on last edited by
                #7

                I have to admit, you at least did a google after last time. However, you have no right to be abusive when people point out the obvious. You need to do more than copy and paste to be a programmer, you need to read the sample code you find, understand it, and configure it for your use. In this case, you need to provide a real mail server name. I assume you just work for SwastikInfoSystems, but have you thought of telling your clueless manager that the name he chose for his company is offensive to his target market ?

                Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                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