473,414 Members | 1,948 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

How to email errorlog table.

Hi all,

I am after some suggestions on ways to email an errorlog table. I have
been working on remote interfaces and would like the users to email
the errorlog back to me at the push of a button when required.

Regards

Karl
Nov 13 '05 #1
3 2166
Googling the archive on CDONT, MAPI, and SendObject might be a start on
e-mailing anything from Access.

Larry Linson
Microsoft Access MVP

"Karl Roes" <ka******@hotmail.com> wrote in message
news:7c**************************@posting.google.c om...
Hi all,

I am after some suggestions on ways to email an errorlog table. I have
been working on remote interfaces and would like the users to email
the errorlog back to me at the push of a button when required.

Regards

Karl

Nov 13 '05 #2
Hi Larry,

Thanks for the pointers. I did have a look at SendObject last night -
the macro defaulted to Outlook, not Outlook Express. It worked though,
sent the report ( via Outlook )in both RTF & HTML, just need to look a
little deeper then have a look at MAPI etc as per your suggestions.

Thanks for your time.

Regards

Karl

"Larry Linson" <bo*****@localhost.not> wrote in message news:<Dv*******************@nwrddc01.gnilink.net>. ..
Googling the archive on CDONT, MAPI, and SendObject might be a start on
e-mailing anything from Access.

Larry Linson
Microsoft Access MVP

"Karl Roes" <ka******@hotmail.com> wrote in message
news:7c**************************@posting.google.c om...
Hi all,

I am after some suggestions on ways to email an errorlog table. I have
been working on remote interfaces and would like the users to email
the errorlog back to me at the push of a button when required.

Regards

Karl

Nov 13 '05 #3
Hi Larry,

Well,I have done some searching and this nice little MAPI snippet
courtesy of Lyle Fairfield does the trick - nice and simple....

.....courtesy Lyle Fairfield.....

Option Explicit

Type MAPIRecip
Reserved As Long
RecipClass As Long
Name As String
Address As String
EIDSize As Long
EntryID As String
End Type

Type MAPIFileTag
Reserved As Long
TagLength As Long
Tag() As Byte
EncodingLength As Long
Encoding() As Byte
End Type

Type MAPIFile
Reserved As Long
Flags As Long
Position As Long
PathName As String
FileName As String
FileType As MAPIFileTag
End Type

Type MAPIMessage
Reserved As Long
Subject As String
NoteText As String
MessageType As String
DateReceived As String
ConversationID As String
Originator As Long
Flags As Long
RecipCount As Long
Recipients As Long
Files As Long
FileCount As Long
End Type

Declare Function MAPISendMail _
Lib "c:\program files\outlook express\msoe.dll" ( _
ByVal Session As Long, _
ByVal UIParam As Long, _
message As MAPIMessage, _
ByVal Flags As Long, _
ByVal Reserved As Long) As Long

Sub SendMailWithOE(ByVal strSubject As String, ByVal strMessage As
String, ByRef
aRecips As Variant)
Dim recips() As MAPIRecip
Dim message As MAPIMessage
Dim z As Long
ReDim recips(LBound(aRecips) To UBound(aRecips))
For z = LBound(aRecips) To UBound(aRecips)
With recips(z)
.RecipClass = 1
If InStr(aRecips(z), "@") <> 0 Then
.Address = StrConv(aRecips(z), vbFromUnicode)
Else
.Name = StrConv(aRecips(z), vbFromUnicode)
End If
End With
Next z
With message
.NoteText = strMessage
.Subject = strSubject
.RecipCount = UBound(recips) - LBound(aRecips) + 1
.Recipients = VarPtr(recips(LBound(recips)))
End With
MAPISendMail 0, 0, message, 0, 0
End Sub

Sub TestSendMailwithOE()
Dim aRecips(0 To 0) As String
aRecips(0) = "smtp:to***@syspac.com"
SendMailWithOE "Send Mail Through OE", "Sure, you can, Tom!",
aRecips
End Sub

...... ......

Can anyone help with automatically attaching say two reports
"rptErrors" and "rptLicSpec" using this MAPI format?

SendObject does make the process of sending a report simple -
DoCmd.SendObject acSendReport, "rptErrors", acFormatTXT, - but not in
OE - pity that. :-(

Now, I read that CDO seems to be all the go - why is it touted as
being more robust than MAPI which seems to work OK?

Regards

Karl
ka******@hotmail.com (Karl Roes) wrote in message news:<7c**************************@posting.google. com>...
Hi Larry,

Thanks for the pointers. I did have a look at SendObject last night -
the macro defaulted to Outlook, not Outlook Express. It worked though,
sent the report ( via Outlook )in both RTF & HTML, just need to look a
little deeper then have a look at MAPI etc as per your suggestions.

Thanks for your time.

Regards

Karl

"Larry Linson" <bo*****@localhost.not> wrote in message news:<Dv*******************@nwrddc01.gnilink.net>. ..
Googling the archive on CDONT, MAPI, and SendObject might be a start on
e-mailing anything from Access.

Larry Linson
Microsoft Access MVP

"Karl Roes" <ka******@hotmail.com> wrote in message
news:7c**************************@posting.google.c om...
Hi all,

I am after some suggestions on ways to email an errorlog table. I have
been working on remote interfaces and would like the users to email
the errorlog back to me at the push of a button when required.

Regards

Karl

Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: rock72 | last post by:
Hello there, Can anyone tell me how to create a php script that when the user click the Submit button, a message will be sent to friends email add stored in mysql table? I created this ff...
5
by: jason | last post by:
I could sure use some conceptualization and query help with a Page Watch System I am building in Access 2000 and Asp. I need to cycle through databae and generate a compiliation query email that...
4
by: dmiller23462 | last post by:
So here's my problem.....I need to set up different email distributions based on which option in the following Select form has been chosen....For instance if "Putaway" is chosen it needs to email...
1
by: bidllc | last post by:
I'm working on a minor bug from an open source bug tracking system (bugtracket.net). It's a great app, but I don't want to bother the creator any more than I have to, so I thought I'd pose the...
0
by: I am Sam | last post by:
Ok I don't know what is the problem with my code But I am trying to build a newsletter that gathers parameters from 3 textbox controls and a Listbox control. The form then queries the event table...
6
by: Rani | last post by:
hi guys I need to send an email from a form the form is collecting data from a user and then submits it to us. I would like the email to appear in the following format Name: Email: Etc. all I...
1
by: John A Grandy | last post by:
Can anyone think of a way to force ErrorLog.WriteEntry() to throw an exception (assuming you don't specify another machine) ? If you specify a non-existent source , it will automatically create a...
1
by: nagamalli26 | last post by:
hai iam new php. i am creating admin side. i wrote this, phpcode: <?php //include_once("config.php"); $con=mysql_connect("localhost","root",""); mysql_select_db("happysalary"); ?>
4
by: Teresa Masino | last post by:
We have set up a couple of SQL Server 2005 systems and I have found that the format of the ERRORLOG files and the SQL Agent's log files are Unicode or some format that findstr cannot parse...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.