SendTo email stopped by IE6 security (1 Viewer)

BarryMK

4 strings are enough
Local time
Today, 12:26
Joined
Oct 15, 2002
Messages
1,352
I've been using code similar to that below to send an alert from a pc triggering the event from my database. I used to get the pop up warning giving the user the choice to cancel the email in case it was a hoax but now get an error message stating. "Microsoft Access can't send a message for the reason stated in the preceding alert"

There is no preceding alert and the email no longer sends. has anyone managed to solve this problem?

What the hell is MS doing?

Private Sub cmdFindPrint_Click()
On Error GoTo Err_cmdFindPrint_Click

DoCmd.RunCommand acCmdSaveRecord

DoCmd.OpenReport "rptFinder", acPreview, "", "[StrayRef]=[Forms]![frmOwnerDetsFinder]![txtStrayRef]"
Dim strEmail As String
Dim strBody As String, strSubject As String
strEmail = "me@here.co.uk"
strSubject = "Owner collecting from finder"
strBody = "Finder's details have been given to a claiming owner. Seizure Sheet Number " & Me!txtStrayRef & " " & Me!txtColour & " " & Me!txtBreedType & " "
DoCmd.SendObject , , , strEmail, , , strSubject, strBody, True
Exit_cmdFindPrint_Click:
Exit Sub

Err_cmdFindPrint_Click:
MsgBox Err.Description
Resume Exit_cmdFindPrint_Click

End Sub
 
Last edited:

BarryMK

4 strings are enough
Local time
Today, 12:26
Joined
Oct 15, 2002
Messages
1,352
Solved!

After lengthy searching I found a snippet of code by the redoubtable GHudson (whom God preserve) that I managed to adapt to my purposes. This is the gist of his thread:

"If you use the Application.FollowHyperlink method with the Mailto: command then you can use this to auto fill the email address, subject and memo body...
Code:
Application.FollowHyperlink "mailto:billgates@microsoft.com?subject=Testing 123&body=Hello!", , True
Just replace the strings with your field names to pull the data off of the form. Just remember that field names can not be enclosed within the double quotes"

My version which pulls through my fields is this:

Application.FollowHyperlink "mailto:me@somewhere.gov.uk &subject=Owner collecting from finder who wishes to keep dog&body= Finder's details have been given to a claiming owner at SomeShop. Seizure Sheet Number " & Me.StrayRef & " " & Me.txtColour & " " & Me.txtGender & " " & Me.txtBreedType, , True

Once again all credit to GHudson.
 

Users who are viewing this thread

Top Bottom