Solved

mail command

Posted on 1998-12-14
2
174 Views
Last Modified: 2010-05-03
I´d like to know how could I include a button in a form, and when someone click this button, the system sends a mail to a specified e-mail address. I´m using TCP/IP here.
Thanks
0
Comment
Question by:ptenuta
2 Comments
 
LVL 1

Accepted Solution

by:
slobstar earned 100 total points
Comment Utility
Private Sub Command1_Click()
  MAPISession1.SignOn
  MAPIMessages1.SessionID = MAPISession1.SessionID
  'compose
  MAPIMessages1.Compose
  'Address message
  MAPIMessages1.RecipDisplayName = "charles@hotmail.com"
  MAPIMessages1.RecipAddress = "Johan"
  ' Resolve recipient name
  MAPIMessages1.AddressResolveUI = True
  MAPIMessages1.ResolveName
  'Create the messagempmMessage.
  MsgSubject = "Status Report"
  MAPIMessages1.MsgNoteText = "Build successful!"
  'Send the message
  MAPIMessages1.Send False
End Sub
0
 

Author Comment

by:ptenuta
Comment Utility
It seems this code calls a mail program . Is it really ? In my case, it opens the Outlook dialog box. I´d like to send the mail without having the mail programs windows opened.
Thank you
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now