Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 01 FEB 2012 09:19:32AM Sean Heinen wrote:

Good day!

The subject is pretty self explanotory.

We're running OInsight 8.0.7.

Since we have the need for emails to go out with html bodies and attachments, I've been searching for a way to make that possible. Previous threads indicate the need has come up before and thanks to them I've investigated and tested the blat.dll.

Thanks to the help provided by this community i was eventually able to get it working… However, one can only call it working if you can reproduce the same results over 100 times in a row. This is where i run into problems. I can't seem to troubleshoot the problem. I'm testing it on a windows 7 machine.

Below are the steps I've taken:

1. Copy blat.dll in OInsight folder

2. Create "DLL"BLAT" Prototype record in SYSPROCS

3. run Declare_FCNS "DLL_BLAT"

4. Close application and reopen

The prototype record looks as follows:

BLAT UINT STDCALL Send(LPCHAR) AS SendBlat

In basic+ I do the following:

Declare function SendBlat EmailCMD = 'C:\Temp.htm -server <servername>-t <recipient> -f <sender> -cc <cc,cc,cc> -s <subject> -u <username>' EmailCMD := ' -pw <password> -attach <filepath>' rv = SendBlat(EmailCMD)

This command line works perfectly everytime when using blat.exe.

Now for my problem. Running through debug, the SendBlat function works sometimes. And those sometimes when which it works, it excludes the attachment. After some forum hopping I discoverd i might need to use the "-base32" or "-base64" parameter. I tried it and it worked… sometimes. Not my main issue though…

My main issue is: the times that it doesnt work, as soon as a step through the function in debug, "OInsight is not responding" pops up. It forces me to close. There is no "wait for the program to respond."

Sorry for the long post. I really hope i can get a fix for this, or if theres any great alternatives. Bearing in mind, we wont be updating OInsight version any time soon.

Thanks!

Sean Heinen


At 02 FEB 2012 07:59AM Dave Harmacek wrote:

I've had success using ZZSMTP from the kind people of Sprezzature.

Dave Harmacek

Harmacek Database Systems


At 06 FEB 2012 07:23AM s smith wrote:

There are mail functions to do this natively in OpenInsight - since 4.13 or so.

SMTPMAIL and SENDMAIL come to mind. Not certain whether they are mentioned in the notes.

They were designed to do multipart mime messaging, or just simple emails - hence the two routines.


At 06 FEB 2012 07:42AM s smith wrote:

Just remembered another factor.

If you're sending HTML formatted messages with imbedded images etc, you need to carve up your message with periodic \0D0A\ character sequences every 80 characters or so, or else you'll risk flooding the buffers of the SMTP mail server.

It was a trap I found during testing on some servers using HTML files as message source without imbedded \0D0A\ (which is invisible of course in an HTML document) . The reliability wasn't 100 percent on some servers (especially Unix ones).

The other factor was that the send() call to the insock dll required sending small chunks also ( less than 200 bytes per call) or else it would become unreliable. Was thinking that this could explain the behaviour you see with BLAT, which is quite dirty in its implementation (lots of parameters and not much finesse in its socket calling).

Steve

steve [at] deadcalm.com


At 06 FEB 2012 09:48AM Steve Penney wrote:

Ah!

I'll look into the flooding thing. It makes sense. I'm pretty sure I ran into the same problem with the see32.dll when i try to retreive emails. I fixed this by increasing the frequency of receiving mail from the server so that not too many emails build up.

The SMTPMAIL and SENDMAIL function are what im using now. Like you mentioned though, I'd like to send HTML formatted messages with imbedded images AND an excel attachment. From what I've read on this forum, BLAT was the only way it could be done with my version of OInsight (OInsight 8.0.7).

"you need to carve up your message with periodic \0D0A\ character sequences every 80 characters or so"

I'll give this a try and let you know how it works out!

Thanks!

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/b3b2f02e0004d7ecae8621a00.txt
  • Last modified: 2023/12/28 07:39
  • by 127.0.0.1