Alpha DevCon 2018
Results 1 to 10 of 10

Thread: Can't start email from button on form

  1. #1
    VAR
    Real Name
    Bill Parker
    Join Date
    Apr 2000
    Location
    Dallas, TX
    Posts
    1,630

    Default Can't start email from button on form

    Desktop application.

    I need to open the default email client from a button on a form. Using either action scripting of xbasic I get the attached error.

    However, if the email address I want to use is in a memo field, then I can click the address and it is populated into a new email message using the default email client - exactly what I want. image attached.

    What needs to be on the button?

    Bill.

    t = table.current()
    email_client_external(t.email)

    also does not work
    t = table.current()
    email_client_external("me@hotmail.com")
    Attached Images Attached Images

  2. #2
    Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,481

    Default Re: Can't start email from button on form

    email_client_external("me@hotmail.com")

    worked in v10 from the interactive window - went to Outlook
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  3. #3
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    24,993

    Default Re: Can't start email from button on form

    V11 as well. don't have a V12 installation with an external email client installed.
    There can be only one.

  4. #4
    VAR
    Real Name
    Bill Parker
    Join Date
    Apr 2000
    Location
    Dallas, TX
    Posts
    1,630

    Default Re: Can't start email from button on form

    email_client_external("me@hotmail.com") does not work for me in the interactive window of v11 or v12 - IF OUTLOOK IS ALREADY OPEN. If I close Outlook then email_client_external("me@hotmail.com") does work from the interactive window and displays a new Outlook email!

    Did you try this with Outlook already open?

    Bill.

  5. #5
    Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,481

    Default Re: Can't start email from button on form

    Quote Originally Posted by Bill Parker View Post
    email_client_external("me@hotmail.com") does not work for me in the interactive window of v11 or v12 - IF OUTLOOK IS ALREADY OPEN. If I close Outlook then email_client_external("me@hotmail.com") does work from the interactive window and displays a new Outlook email!

    Did you try this with Outlook already open?

    Bill.
    Looks like the Outlook window is opened as a dialog. If you send that email, then you can open another email....
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  6. #6
    Member
    Real Name
    don walters
    Join Date
    Mar 2002
    Location
    North Carolina
    Posts
    113

    Default Re: Can't start email from button on form

    email_client_external("me@hotmail.com") worked for me interactive also V10 - using Mozilla Thunderbird

    I have Xbasic script for automating PDF invoices if you need something like that.

    Don

  7. #7
    VAR
    Real Name
    Bill Parker
    Join Date
    Apr 2000
    Location
    Dallas, TX
    Posts
    1,630

    Default Re: Can't start email from button on form

    Quote Originally Posted by Al Buchholz View Post
    Looks like the Outlook window is opened as a dialog. If you send that email, then you can open another email....
    Not sure what you mean by 'send that email'. The Outlook window has no pending email to send. It just sits open and checks for new POP email every so often. From the Outlook window I can click it's button to start a new email, but in this case I want to click the Alpha button to start a new email.

    What makes me know this is possible is that, on the Alpha form, clicking an email address embedded in a memo field (address displays as a hot link) does correctly open a new Outlook email message, even when Outlook is open. I just don't have a way to see the code Alpha is executing in that case.

    Bill.

  8. #8
    Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,481

    Default Re: Can't start email from button on form

    1. Outlook open.

    2. Alpha code to send email executes and an Outlook email window is opened.

    3. Complete that email and then Alpha can open another Outlook email window. But not before the the previous instance is sent or closed without sending.

    Also, I would use a fieldname other than email. ie t.email should be t.primary_email or something like that.

    Long lost memory of using 'email' as a fieldname being a problem is returning....
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  9. #9
    VAR
    Real Name
    Bill Parker
    Join Date
    Apr 2000
    Location
    Dallas, TX
    Posts
    1,630

    Default Re: Can't start email from button on form

    Al,

    Well, I got around to setting up another machine to test this on - which I should have done in the beginning. It does work correctly on a Win 10 machine with Office 2010, but not on the Win 8 development machine. So now it is down to figuring out the configuration differences that cause the problem. Thanks for testing.

    Bill.

  10. #10
    Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,481

    Default Re: Can't start email from button on form

    Quote Originally Posted by Bill Parker View Post
    Al,

    Well, I got around to setting up another machine to test this on - which I should have done in the beginning. It does work correctly on a Win 10 machine with Office 2010, but not on the Win 8 development machine. So now it is down to figuring out the configuration differences that cause the problem. Thanks for testing.

    Bill.
    So do you have a boat? Cuz you certainly have an anchor for it.

    If you can't upgrade to Win 10, then tie a rope around the Win 8 machine and go fishing...
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

Similar Threads

  1. Email button on mobile form
    By jrmplus in forum Mobile & Browser Applications
    Replies: 0
    Last Post: 07-26-2016, 04:28 AM
  2. Email from a button - use non-default email settings
    By lgrupido in forum Mobile & Browser Applications
    Replies: 0
    Last Post: 11-19-2014, 02:07 PM
  3. Email issue - send to email button not showing
    By lgrupido in forum Application Server Version 10 - Web/Browser Applications
    Replies: 0
    Last Post: 04-17-2012, 04:02 PM
  4. Flying Start No Finish Button
    By mpierce in forum Application Server Version 10 - Web/Browser Applications
    Replies: 3
    Last Post: 10-30-2010, 09:22 AM
  5. Open your Email program from a Button on your Form
    By Selwyn Rabins in forum Code Archive
    Replies: 3
    Last Post: 07-17-2000, 12:38 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •