Solved

mail command

Posted on 1998-12-14
2
192 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
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

815 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

12 Experts available now in Live!

Get 1:1 Help Now