Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / June 2007

Tip: Looking for answers? Try searching our database.

Sending eMail Without Queing To Outlook?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
(PeteCresswell) - 30 May 2007 12:21 GMT
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?
Signature

PeteCresswell

Rick Brandt - 30 May 2007 12:27 GMT
> I've done a few apps that send eMails, but always using MAPI -
> which requires somebody to open up Outlook and click "Send".
[quoted text clipped - 10 lines]
> 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.

Signature

Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com

Baz - 30 May 2007 12:32 GMT
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

> I've done a few apps that send eMails, but always using MAPI -
> which requires somebody to open up Outlook and click "Send".
[quoted text clipped - 10 lines]
> Is there any hope for this:  writing VBA code to send an eMail
> directly to the company's eMail server?
Baz - 30 May 2007 12:35 GMT
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

> Lots of ways, but this is my favourite:
>
[quoted text clipped - 34 lines]
> > Is there any hope for this:  writing VBA code to send an eMail
> > directly to the company's eMail server?
(PeteCresswell) - 31 May 2007 02:04 GMT
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.... -)
Signature

PeteCresswell

Baz - 31 May 2007 06:03 GMT
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:
> >Dim CDOMessage As Object
[quoted text clipped - 10 lines]
> server directory."..... No way they're going to let vendor scum
> like me put something there.... -)
(PeteCresswell) - 01 Jun 2007 02:47 GMT
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.
Signature

PeteCresswell

Long Live Aaron Kempf - 25 Jun 2007 04:43 GMT
yes use SQL Server and xp_sendmail

Access Data Projects are a much better platform than MDB junk

> I've done a few apps that send eMails, but always using MAPI -
> which requires somebody to open up Outlook and click "Send".
[quoted text clipped - 10 lines]
> Is there any hope for this:  writing VBA code to send an eMail
> directly to the company's eMail server?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.