jbpelletier
Programmer
'I know that:
'this can send an email via acces to outlook without
'asking for a confirmation. the code use OSSMTP.DLL
'driver
Option Compare Database
Option Explicit
Public Sub testSendMail()
Dim oSMTP As OSSMTP.SMTPSession
On Error Resume Next
Set oSMTP = CreateObject("OSSMTP.SMTPSession"
oSMTP.Server = "server.name.something"
oSMTP.MailFrom = "MyEmail@something.com"
oSMTP.SendTo = "YourEmail@something.com"
oSMTP.MessageSubject = "test"
oSMTP.MessageText = "Hello"
' oSMTP.Attachments.Add "path off the file"
oSMTP.SendEmail
If Err.Number <> 0 Then
Debug.Print "Error " & Err.Number & ": " & Err.Description
Else
Debug.Print "Success"
End If
End Sub
'question:
'Is it also possible to send via acces thing like "meeting confirmation", "note" (little yellow paper), "task", etc too outlook (to an other person on the intra-net) ? if yes.. can u provide me a link or a code sample.
tanx
jb
'this can send an email via acces to outlook without
'asking for a confirmation. the code use OSSMTP.DLL
'driver
Option Compare Database
Option Explicit
Public Sub testSendMail()
Dim oSMTP As OSSMTP.SMTPSession
On Error Resume Next
Set oSMTP = CreateObject("OSSMTP.SMTPSession"
oSMTP.Server = "server.name.something"
oSMTP.MailFrom = "MyEmail@something.com"
oSMTP.SendTo = "YourEmail@something.com"
oSMTP.MessageSubject = "test"
oSMTP.MessageText = "Hello"
' oSMTP.Attachments.Add "path off the file"
oSMTP.SendEmail
If Err.Number <> 0 Then
Debug.Print "Error " & Err.Number & ": " & Err.Description
Else
Debug.Print "Success"
End If
End Sub
'question:
'Is it also possible to send via acces thing like "meeting confirmation", "note" (little yellow paper), "task", etc too outlook (to an other person on the intra-net) ? if yes.. can u provide me a link or a code sample.
tanx
jb