473,781 Members | 2,732 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2179
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******@hotma il.com> wrote in message
news:7c******** *************** ***@posting.goo gle.com...
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*****@localh ost.not> wrote in message news:<Dv******* ************@nw rddc01.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******@hotma il.com> wrote in message
news:7c******** *************** ***@posting.goo gle.com...
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.dl l" ( _
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(a Recips) 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(L Bound(recips)))
End With
MAPISendMail 0, 0, message, 0, 0
End Sub

Sub TestSendMailwit hOE()
Dim aRecips(0 To 0) As String
aRecips(0) = "smtp:to***@sys pac.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.SendObjec t 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******@hotmai l.com (Karl Roes) wrote in message news:<7c******* *************** ****@posting.go ogle.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*****@localh ost.not> wrote in message news:<Dv******* ************@nw rddc01.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******@hotma il.com> wrote in message
news:7c******** *************** ***@posting.goo gle.com...
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
2947
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 table structure using mysql ? Field Type Size Description
5
2080
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 notifies a person of yacht(s) that have changed on our website: Key database tables ---------------------------------------------------------------------------- Customer (1) --->> (many) Customer_Boats (many)<<---- Boat (1)
4
3020
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 User1@here.whatever and User4@here.whatever but if "Loaded" is chosen it needs to email User2@here.whatever and User3@here.whatever, etc, etc... I'm aware that the only thing that really needs to change is the "Mail.AddAddress" line (at least...
1
2095
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 question here. The problem is with an email that gets sent from the system. In a nutshell, it's an HTML format email that is choking on the string that is returned form this function that is added to the email's body:
0
1488
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 based on 2 of the textboxes one for the start date of the events required and one for the last date of the events required. The 3rd textbox works fine. It passes the text from the textbox to the stringbuilder I built on the codebehind just fine....
6
1403
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 was able to do so far is: strBody = "Name :" & strname & " Email :" & StrEmail etc.
1
1965
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 log for it , so that won't work.
1
2023
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
3681
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 properly. "find" parses them fine, but it doesn't have the capabilities that I need -- specifically, I can't search for multiple strings in one search. I see the checkbox on the SQL Agent's for "Write OEM File", but it is grayed out so I am not able...
0
9639
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9474
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10308
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8964
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7486
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6729
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5375
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5507
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.