Sending eMail Without Queing To Outlook?

  • Thread starter Thread starter (PeteCresswell)
  • Start date Start date
P

(PeteCresswell)

I've done a few apps that send eMails, but always using MAPI -
which requires somebody to open up Outlook and click "Send".

Now I'm about to start on a "tickler" app that keeps a
highly-customized To-Do list and prints a report of upcoming
tasks.

Seems like a natural for email: a list of recipients, compose a
task list, and send it - running the app on an application server
where that part of it seldom, if ever, needs any human
intervention.

Is there any hope for this: writing VBA code to send an eMail
directly to the company's eMail server?
 
(PeteCresswell) said:
I've done a few apps that send eMails, but always using MAPI -
which requires somebody to open up Outlook and click "Send".

Now I'm about to start on a "tickler" app that keeps a
highly-customized To-Do list and prints a report of upcoming
tasks.

Seems like a natural for email: a list of recipients, compose a
task list, and send it - running the app on an application server
where that part of it seldom, if ever, needs any human
intervention.

Is there any hope for this: writing VBA code to send an eMail
directly to the company's eMail server?

Will all machines be using Win2K or higher? If so then CDOSys should be
installed on all of them. That works very well and is pretty easy to automate.
 
Lots of ways, but this is my favourite:

Dim CDOMessage As Object
Dim CDOConf As Object
Dim CDOFlds As Object
Set CDOConf = CreateObject("CDO.Configuration")
Set CDOFlds = CDOConf.Fields
CDOFlds("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
CDOFlds("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "my
SMTP server name"
CDOFlds("http://schemas.microsoft.com/cdo/configuration/smtpserverport") =
25
CDOFlds.Update
Set CDOMessage = CreateObject("CDO.Message")
Set CDOMessage.Configuration = CDOConf
With CDOMessage
.From = "

.To = strEmail
.Subject = "Test Message"
.TextBody = strBody
.Send
End With
 
Oops, hit send too soon. Should have been this:

Lots of ways, but this is my favourite:

Dim CDOMessage As Object
Dim CDOConf As Object
Dim CDOFlds As Object
Set CDOConf = CreateObject("CDO.Configuration")
Set CDOFlds = CDOConf.Fields
CDOFlds("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
CDOFlds("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "my
SMTP server name"
CDOFlds("http://schemas.microsoft.com/cdo/configuration/smtpserverport") =
25
CDOFlds.Update
Set CDOMessage = CreateObject("CDO.Message")
Set CDOMessage.Configuration = CDOConf
With CDOMessage
.From = "from.someone@somewhere"
.To = "to.someone@somewhere"
.Subject = "Test Message"
.TextBody = strBody
.Send
End With
 
Per Baz:
Dim CDOMessage As Object

Reading http://www.codeproject.com/asp/cdoex.asp, I get the
impression that this is some sort of web service.

Correct?

Either way, should I be looking for some corporate security
concern if I put it on a client's PC?

May be moot considering the statement: "Put the files in a web
server directory."..... No way they're going to let vendor scum
like me put something there.... -)
 
Not correct, it isn't a web service. That article only waffles on about web
servers because it is showing how to use CDOSYS from an ASP page.
 
Per Baz:
Not correct, it isn't a web service. That article only waffles on about web
servers because it is showing how to use CDOSYS from an ASP page.

Guess I've got to give it a try.

Thanks for the clarification.
 
yes use SQL Server and xp_sendmail

Access Data Projects are a much better platform than MDB junk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top