Re: Automating sending e-mail

Tech-Archive recommends: Speed Up your PC by fixing your registry



How do you know they're using SMTP?

I don't know how e-mail is organised, but why then in that application I mentioned is the top text box in the
SendMail form called SMTP Server?
How does it work if they are on Exchange or something else?

RBS


"MikeD" <nobody@xxxxxxxxxxx> wrote in message news:ePp9CSHpGHA.4848@xxxxxxxxxxxxxxxxxxxxxxx

"RB Smissaert" <bartsmissaert@xxxxxxxxxxxxxxxx> wrote in message news:OkHWSkGpGHA.516@xxxxxxxxxxxxxxxxxxxxxxx
Found what to me looks like some very nice code to send e-mails from VB at:
http://www.freevbcode.com/ShowCode.Asp?ID=109

I thought I could use this to automate sending error data
from an application to my e-mail address.

Would there be a way though to automate:
getting the e-mail address of the sender.

There are several places in the Registry where you can look for it, but no guarantees it'll be there (or be the one you want). It all depends on the email client and/or the version of Windows.

It'll be in the following key if they use Outlook Express:

HKEY_CURRENT_USER\Software\Microsoft\Internet Account Manager\Accounts
(it'll actually be in a subkey of the above)

Under Win9x and WinNT and I think Win2000, you might find it in either of these 2 locations (if the user provided it during registration of Windows)
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\User Information
HKEY_CURRENT_USER\Software\Microsoft\User Information

These keys apparently don't exist under WinXP. The other problem with them is that the email address could very well be outdated. I know people who change their email address every few months because they're always changing ISPs (or because they're careless with it and get hundreds of junk emails a day). Try searching the Registry for your own email address and see where all you find it. Most likely, you'll find it in several places in the Registry. But like I said, none of them are guaranteed for any given PC.

IMO, the best thing you can do is prompt the user for it and save it yourself (and make sure to provide a way for a user to change it).


getting the smtp server used by the sender.

How do you know they're using SMTP? They might be using Exchange or AOL or web-based or some other email method than SMTP/POP3.

--
Mike
Microsoft MVP Visual Basic



.



Relevant Pages

  • HTTP/1.1 503 Service Unavailable error...Once again!
    ... Windows is current with patches, as is Exchange, ... Folders, Public Folders, I get a c1030af3 "The HTTP service used by ... HKEY_Classes_Root registry hive that exceeds 259 characters....". ...
    (microsoft.public.exchange.admin)
  • HTTP/1.1 503 Service Unavailable error...Once again!
    ... Windows is current with patches, as is Exchange, ... Folders, Public Folders, I get a c1030af3 "The HTTP service used by ... HKEY_Classes_Root registry hive that exceeds 259 characters....". ...
    (microsoft.public.exchange2000.admin)
  • OWA HTTP/1.1 503 Service Unavailable error...Once again!
    ... Windows is current with patches, as is Exchange, ... Folders, Public Folders, I get a c1030af3 "The HTTP service used by ... HKEY_Classes_Root registry hive that exceeds 259 characters....". ...
    (microsoft.public.exchange2000.general)
  • Re: Have all incoming email forwarded to a specific address
    ... >I know this is an exchange group, but I am not able to use exchange in ... >for x.com which is pointing to my Windows Server 2003 box with windows ... >How can I accomplish this using just the windows SMTP server? ... Since I don't know what mail system is looking after y.com I couldn't ...
    (microsoft.public.exchange.misc)
  • Have all incoming email forwarded to a specific address
    ... I know this is an exchange group, but I am not able to use exchange in ... the enviroment that I need to solve this problem in...so I was hoping ... for x.com which is pointing to my Windows Server 2003 box with windows ... How can I accomplish this using just the windows SMTP server? ...
    (microsoft.public.exchange.misc)