Solved

mail command

Posted on 1998-12-14
2
205 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
slobstar earned 100 total points
ID: 1450040
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
ID: 1450041
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to make an ADE file by code? 11 99
Child Form in front 4 56
VBA - If Bookmark = "XXBOOKMARKXX" then 15 51
Collapse and expand table in Word 2010 2 99
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…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

749 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