Fred Hooper
fahooper at trapo.com
Sun Dec 21 13:22:51 CST 2003
Dan,
I don't know. I combined two suggestions I found using Google, one from
microsoft. If you search on
"http://schemas.microsoft.com/cdo/configuration/sendusing" you find
"http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdosys/htm
l/_cdosys_schema_configuration.asp", which was my main source.
While this seems to be for W2K, looking around a bit, I found "Note CDO
works with Microsoft Outlook, but CDO.DLL is not installed with the
Microsoft Outlook 97 setup program." Perhaps this will help you.
I like the approach because I am not restricted to a real "from" in the
email, which I'm using in some VB utilities to manage some Cognos BI stuff.
I just send the email from "CubeBuilder", which seems to make sense to our
users.
You're welcome
Fred
|-----Original Message-----
|From: accessd-bounces at databaseadvisors.com
|[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dan Waters
|Sent: Saturday, December 20, 2003 3:29 PM
|To: 'Access Developers discussion and problem solving'
|Subject: RE: [AccessD] Route email to SMTP Server from Access
|
|
|Fred,
|
|This code tells me a lot - Thanks!
|
|Does this work with any version of CDO?
|
|Thanks,
|Dan
|
|-----Original Message-----
|From: accessd-bounces at databaseadvisors.com
|[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Fred Hooper
|Sent: Saturday, December 20, 2003 12:40 PM
|To: 'Access Developers discussion and problem solving'
|Subject: RE: [AccessD] Route email to SMTP Server from Access
|
|
|Hi Dan,
|
|Here's the way I'm doing it:
|
|Public Sub SendEmail(strFrom As String, strTo As String,
|strSubject As String, strMessage As String)
| Dim objEmail As Object
| Dim objMsg As Object
| Dim objConf As Object
| Dim Flds As Variant
|
| Set objMsg = CreateObject("cdo.message")
| Set objConf = CreateObject("cdo.configuration")
|
| Set Flds = objConf.Fields
| With Flds
| ' The first item with value "2" indicates that smpt
|not installed on this machine
|
|.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
| ' Next item is the name of the smpt server to use.
| ' Look in Outlook | Tools | Email Accounts | View or
|change... | Change to find
|
|.Item("http://schemas.microsoft.com/cdo/configuration/smtpserve
|r") = "<exchange server name"
| ' This is the port the smpt server uses, 25 is the default
|
|.Item("http://schemas.microsoft.com/cdo/configuration/smptserve
|rport") = 25
| .Update
| End With
|
| With objMsg
| Set .configuration = objConf
| .To = strTo
| .From = strFrom
| .Subject = strSubject
| .Textbody = strMessage
| .Fields.Update
| .Send
| End With
|
| Set objMsg = Nothing
| Set objConf = Nothing
|End Sub
|
|
||-----Original Message-----
||From: accessd-bounces at databaseadvisors.com
||[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Dan Waters
||Sent: Wednesday, December 17, 2003 2:55 PM
||To: Database Advisors
||Subject: [AccessD] Route email to SMTP Server from Access
||
||
||Hello and Happy Holidays to everyone!
||
||I have a customer I am getting started with. To send email and get
||around the Outlook security patch, I suggested either using
|Redemption
||or using the Outlook Security Administrator's package. I
|then received
||the suggestion to try sending email straight to the SMTP server,
||bypassing the security problem.
||
||What seems to be required to do this is to either use CDO, of which
||there are different versions (CDO, CDONTS, and CDOSYS), or a
|3rd party
||product. Is this really correct or is there another way? Perhaps a
||Windows API that can be used for the same purpose?
||
||I did do a search on the archives for SMTP, but because many people's
||emails have SMTP in the email header, the search was not useful.
||
||Anyone have an early Christmas present they can give me?
||
||Thanks!
||Dan Waters
||Quality Process Solutions.
||_______________________________________________
||AccessD mailing list
||AccessD at databaseadvisors.com
||http://databaseadvisors.com/mailman/listinfo/ac|cessd
||Website:
||http://www.databaseadvisors.com
||
|
|_______________________________________________
|AccessD mailing list
|AccessD at databaseadvisors.com
|http://databaseadvisors.com/mailman/listinfo/ac|cessd
|Website:
|http://www.databaseadvisors.com
|
|
|_______________________________________________
|AccessD mailing list
|AccessD at databaseadvisors.com
|http://databaseadvisors.com/mailman/listinfo/ac|cessd
|Website:
|http://www.databaseadvisors.com
|