473,396 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to send a mail automatically?

16
I know how to create an outlook object. this is the function I wrote:
Expand|Select|Wrap|Line Numbers
  1. Public Sub Outlook_CreateNew(prmOutLookType As Integer, Optional prmEmailAdress As String, Optional prmMessage As String)
  2.     Dim objOL As Object
  3.     Set objOL = CreateObject("Outlook.Application")
  4.     Dim NewTask As Object
  5.     Set NewTask = objOL.CreateItem(prmOutLookType)
  6.     If prmOutLookType = 0 Then 'Mail
  7.         NewTask.To = prmEmailAdress
  8.         NewTask.Body = prmMessage
  9.     End If
  10.     NewTask.Display
  11. End Sub
-----------------------------------------------------
If anybody can answer me:
1.How can I do that the computer also will send the mail automatically by Button event without opening the outlook?
2. How can I find the outlook properties, it was a miracle I found out that "obj.Body" is the body text, I just gussed, the problem is it don't give like intelisence.
Mar 14 '07 #1
1 1224
NeoPa
32,556 Expert Mod 16PB
  1. Try DoCmd.SendObject()
  2. Use F2 to go to the Object Browser Pane. Navigate from there into the Outlook library reference etc.
Mar 20 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: nate heaton | last post by:
I would like to do the following with C# in my asp.net app: Open the default email client of the user (just like a mailto: link would). Supply the subject line and put some HTML (including an...
0
by: David Burson | last post by:
Hi, I have a VB.NET windows app that needs to automatically send a simple text email when my users run a new version of the app for the first time. I thought this would be simple, but after...
6
by: JIM.H. | last post by:
Hello, I am using SmtpMail.Send() and I get the following message The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for myMail@hotmail.com...
5
by: sam | last post by:
Do anyone know how to apply send datagrid via email? Any website for reference? Please advise.
10
by: John Davies | last post by:
I want to send a bug report automatically from my VB.NET program. I won't know the end user's smtp server or what email client they are using. The Process.Start with mailto is almost what I need,...
0
by: jjalexrayer | last post by:
How do send mail automatically in asp.net? Public people can register in my website. after registering system will send email every 10 days reports without any admin actions(that means...
11
by: fdu.xiaojf | last post by:
Hi, I just want to send a very simple email from within python. I think the standard module of smtpd in python can do this, but I haven't found documents about how to use it after googleing....
4
by: mse07 | last post by:
hi for everyone if i send e-mail by visual basic from outlook , before outlook complete sending the message it shows message box contain following text : A program is trying to...
0
by: manontheedge | last post by:
I'm trying to automatically send emails through VB, through Microsoft Outlook 2003, but get the security message ... "A program is trying to automatically send e-mail on your behalf. Do you want...
4
by: Samnang | last post by:
Hi, I have a list of email address of my customers, I would like to build an application that can send product promotion to them in regular once a week. I'm afraid that my email will deliver as...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.