View Full Version : Email_client() stopped working?


02-18-2004, 06:12 AM
Can anyone else confirm whether the email_client() function has stopped working?

If I open A5 to a very simple application, go directly to the Interactive Editor and enter:

The A5 email client opens and I can enter a message but when I hit the "send" button, I get a "variable not found" error in a script named "Send_an_E-mail" at a line with the following text:
email_send_result = email_send(send_to,subject,preview_string,attach,cc,bcc,.t.,text_type,"", profile, .F.)

When I run the debugger, each variable seems to be ok!?

FWIW: The issue started when I tried to run a script which entered a default mail_to, subject, body_text, and attachment. This script worked in past weeks but won't work today. I rebooted the computer and tried sending a simple e-mail directly from the Interactive Editor to see if it was a problem in my script. I'm not sure what version I was on when it last worked.

02-18-2004, 06:21 AM
Oh Great! Now I find out that it actually did send the messages even though I get the error message. One customer ended up getting 6 copies of the same invoice!

(Yes, I did check it in my email_outbox but nothing was there. I also sent myself an email but, due to delays in receiving them from my own email, they didn't appear to be going out.)

Kevin Anderson
02-18-2004, 08:07 AM
I'm seeing the same thing Cal when attempting anything that requires Alpha's own email "compose" dialog to open but when using the following code on a button it sends as it should, with no errors. I've seen others reference this and I expect it will be corrected soon.

Kevin Anderson

DIM pm as P

pm.from = "kev@andersoft.com"
Pm.from_alias = "Kevin Anderson"
pm.to = "nka@andersoft.com"
pm.cc = ""
pm.bcc = ""
pm.subject = "JailCom Invoice"
pm.message = "Invoice Attached"
pm.html_message = "Invoice Attached"

pm.attachments = ""%str%

' send message

IF email_smtp_open(ps, "andersoft.com")
email_smtp_send(pm, ps)


02-18-2004, 09:50 AM

I've left a few messages regarding the Email_client() function and some quirky behavior. I do have a rather detailed funtion working on a button on a form. Simply it uses the report.saveas funtion and then opens the e-mail client function to send this report to a designated customer. It seems to work fine as a button but if I move the code to a custom menu A5 will freeze and I have to restart A5. I am using Alpha's built in e-mail client and I'm trying to clean up a form by moving buttons to a custom menu. I received the "variable not found" error in the beginning but now it is just freezing the system

02-18-2004, 11:36 AM

Can you send me a copy of your outbox and your email settings (I don't need passwords or anything). Nothing has changed in email_client() in a over a year, but I have seen this occur before and want to track the problem down.


02-18-2004, 02:46 PM
I will send them on a separate e-mail but, in case it means anything or will help anyone else, I noticed as I was zipping them that the .ddx file has disappeared. The .ddm and .ddd are still there.

02-18-2004, 08:30 PM
Some days I hate working with computers!

The email_client() is working again and I have no idea why.

I did rename the old .ddd and .ddm files (as noted previously, the .ddx was missing) then opened the table so A5 would recreate all 3 data dictionary files. Then I deleted the new .ddd and .ddm and renamed the originals to get them back then ran a dictionary update in hopes of resetting the .ddx file. At that point, I rebooted and tried the email_client() but it still caused an error. Now, after deleting a few files and copying some stuff to CD (i.e., some general cleanup), the d(#*$& thing works.