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. General Programming
  3. C / C++ / MFC
  4. sending email from vc++

sending email from vc++

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++sysadminlounge
4 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.
  • A Offline
    A Offline
    Alex Griffing
    wrote on last edited by
    #1

    How can I send email from a program? I would like to not have to go through an SMTP server. On a related note, but off topic for this forum, I set up an SMTP server on my computer but when I tried to email my hotmail account through it, it said that it was 'unable to relay' for that email address. On the 'relay restrictions' page of the internet information services settings I have the 'Allow all computers which successfully authenticate to relay' check box checked. Thank you for suggestions, -Alex Griffing

    N D P 3 Replies Last reply
    0
    • A Alex Griffing

      How can I send email from a program? I would like to not have to go through an SMTP server. On a related note, but off topic for this forum, I set up an SMTP server on my computer but when I tried to email my hotmail account through it, it said that it was 'unable to relay' for that email address. On the 'relay restrictions' page of the internet information services settings I have the 'Allow all computers which successfully authenticate to relay' check box checked. Thank you for suggestions, -Alex Griffing

      N Offline
      N Offline
      Nemanja Trifunovic
      wrote on last edited by
      #2

      See this: http://www.codeproject.com/useritems/xymailclient.asp I vote pro drink :beer:

      1 Reply Last reply
      0
      • A Alex Griffing

        How can I send email from a program? I would like to not have to go through an SMTP server. On a related note, but off topic for this forum, I set up an SMTP server on my computer but when I tried to email my hotmail account through it, it said that it was 'unable to relay' for that email address. On the 'relay restrictions' page of the internet information services settings I have the 'Allow all computers which successfully authenticate to relay' check box checked. Thank you for suggestions, -Alex Griffing

        D Offline
        D Offline
        David Cunningham
        wrote on last edited by
        #3

        Hey Alex, Well, I suppose you have few choices. MAPI If you are willing to rely on the MAPI subsystem in Windows, you can certainly use MAPI to deliver the email. There can be issues with using MAPI from within NT Services (I guess we need to start calling these something else now with the advent of 2000 and XP), not sure if this is part of your objective. Depending on how and where your software will be distributed, it can also be problematic to ensure that your clients will configure MAPI properly. Mapi works well however, when everything is configured and running. DUMB SMTP There are lots of basic SMTP mail classes and code around, so if you don't need attachments, rich content, MIME etc., and you know you have access to a set up and working "smart" SMTP host, you could use something like this. Setup here too can be a little tricky. Your clients need to provide the name of the smart host, there really isn't any way to auto detect this. SMART SMTP ** warning: I'm going to plug a product from my company :) Depending on your needs, an option could be to use a comprehensive library like our Dundas TCP/IP toolkit. The toolkit includes all the SMTP and MIME stuff to handle attachments, rich content, etc., and it is also smart enough to be able to deliver the outgoing email directly to the recipients email server (no need for a relay host). The toolkit is 100% C++ and provided as source code, so it compiles right into your .exe w/o any external dependencies. Check it out: http://www.dundas.com/index.asp?products/tcpip/index.asp HTH, David

        1 Reply Last reply
        0
        • A Alex Griffing

          How can I send email from a program? I would like to not have to go through an SMTP server. On a related note, but off topic for this forum, I set up an SMTP server on my computer but when I tried to email my hotmail account through it, it said that it was 'unable to relay' for that email address. On the 'relay restrictions' page of the internet information services settings I have the 'Allow all computers which successfully authenticate to relay' check box checked. Thank you for suggestions, -Alex Griffing

          P Offline
          P Offline
          Peter Weyzen
          wrote on last edited by
          #4

          You've got 2 choices: * MAPI (yuk) * SMTP (easy) I've done both -- and neither are great. SMTP has turned out to be easier, but you gotta learn the protocol. MAPI is a pain.... MAPI is a little more memory intensive, by making those memory calls, all of the MAPI suport gets loaded. SMTP only needs to load winsock... As for your main problem -- it seems that you've not actually authenticated. -p

          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