Sending eMail Without Queing To Outlook?

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?
 
R

Rick Brandt

(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.
 
B

Baz

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
 
P

(PeteCresswell)

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.... -)
 
P

(PeteCresswell)

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.
 
L

Long Live Aaron Kempf

yes use SQL Server and xp_sendmail

Access Data Projects are a much better platform than MDB junk
 
Top