Re: Automating sending e-mail



OK, I understand then that the only reliable way is to ask the user and store it somewhere with the option to change.

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

  • NewestShareware.com Issue #89
    ... FileBoss for Windows ... Program Homepage/Download url ... In general users make a program execute at window startup by ... Adding programs to the Registry and WIN.INI file protects the program. ...
    (comp.software.shareware.announce)
  • Re: Windows XP home login/off
    ... How to Perform an In-Place Upgrade of Windows XP ... Click on How To Run a Repair Install ... registry has worked the 5 or 6 times I have seen this problem. ... The script will stop and ask you to hit enter to continue to load SCSI ...
    (microsoft.public.windowsxp.wmi)
  • RE: Windows 2000 RRAS and ipSEC /L2TP VPN
    ... How to Configure a L2TP/IPSec Connection Using Pre-shared Key Authentication ... This article contains information about modifying the registry. ... , Windows 2000 is compliant with IKE RFC ...
    (microsoft.public.win2000.networking)
  • RE: Networking and DOS attacks
    ... Windows has found 55 Critical System Errors... ... Install Repair Registry Pro. ... I have tracked all of these UDP port hits since 2001. ...
    (Security-Basics)
  • RE: Problems to create a new internet conection
    ... You Cannot Create a Network Connection After You Restore Windows XP ... This article contains information about modifying the registry. ... You cannot create a remote access or Dial-Up Networking connection. ...
    (microsoft.public.windowsxp.help_and_support)