Kath Pelletti
kp at sdsonline.net
Mon Feb 19 18:57:38 CST 2007
Hi David - I only use the .Display option in my apps so that the users can add some text to the email if they want to before it is sent, but .send WILL send the email depending on their Outlook preferences. ie. if they have [tools] [options] [mail delivery] 'Send immediately when connected' turned on, then yes, it will send. I haven;t found any way of that email not going into sent items though. Kath ----- Original Message ----- From: David Emerson To: accessd at databaseadvisors.com Sent: Tuesday, February 20, 2007 11:31 AM Subject: [AccessD] Automating email Group, I have the following code to create an email message: Public Function basSendEmail() Dim outApp As Outlook.Application, outMsg As MailItem Set outApp = CreateObject("Outlook.Application") Set outMsg = outApp.CreateItem(olMailItem) With outMsg .To = "newsgrps at dalyn.co.nz" .Subject = "Test egas email" .Body = "Test message" .Send End With Set outApp = Nothing Set outMsg = Nothing End Function This works fine but only puts the message into my Outlook outbox - it doesn't send it. This may be because although I have outlook installed I do not use it (and it has not been set up). However, my clients use outlook. Will the above code automatically send out emails? Another question - My client would prefer not to have copies in their outbox of the email being sent out (ultimately it will be to email out accounts and they don't want thousands of emails generated each month). Is there a way for the messages not to appear in outlook? -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com