Alpha Video Training
Results 1 to 6 of 6

Thread: email_send2() is not working

  1. #1
    Member
    Real Name
    Tony Watts
    Join Date
    Mar 2010
    Posts
    442

    Default email_send2() is not working

    I am trying to send a simple email by using email_send2()

    The following function is called by a ajax callback by a button on a ux

    function emailSendSMTP as c (e as p)

    dim pm as P
    pm.to = "tony@gmail.com"
    pm.subject = "Test email"
    pm.message = "Testing simple email"
    email_send2(pm)

    end function


    I think I have the email settings set properly in project properties
    (I can successfully send emails by clicking on a button on this same ux. The on click event for the button is a built in action javascript-Send Email)

    Thanks
    Tony

  2. #2
    Member
    Real Name
    Tony Watts
    Join Date
    Mar 2010
    Posts
    442

    Default Re: email_send2() is not working

    I need to clarify the title, I'm sure email_send2() is working ...... "I" am having problems figuring out how to use it properly
    Sorry

  3. #3
    Volunteer Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,842

    Default Re: email_send2() is not working

    email_send2() needs an Alpha email profile, but you said you already have one. Because you have entered no profile in the email_send2() function*, it will use the "default" email profile. The default profile is the one that is highlighted when you close Alpha's email profile dialog on the server. It is NOT necessarily the one named "default", if you have one.

    *Result_Flag as L = EMAIL_SEND2( Message as P [, Profile as C [, Silent as L [, Store_in_Mailbox as L [, autowrap as L ]]]] )
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  4. #4
    "Certified" Alphaholic
    Real Name
    Frank Bicknell
    Join Date
    Feb 2010
    Location
    39.1915° N, 84.4348° W
    Posts
    2,467

    Default Re: email_send2() is not working

    Quote Originally Posted by Steve Wood View Post
    The Help text states you need an Alpha email profile. If you have not worked with those in the past it is best to avoid them. Why do you not want to use email_smtp_send()?

    Note : EMAIL_SEND2() requires that you have configured an Alpha Five email profile. If you are working in an environment where this is not possible, use EMAIL_SMTP_OPEN(), EMAIL_SMTP_SEND(), and EMAIL_SMTP_CLOSE().
    I just changed from email_send2() as Steve suggested and found that using the EMAIL_SMTP_OPEN() methods is much more robust and easier to use than email_send2(). Just look at the sample code in the documentation.
    Win 10 64 Development, Win 7 64 WAS 11-1, 2, Win 10 64 AA-1,2, MySql, dbForge Studio The Best MySQL GUI Tool IMHO. http://www.devart.com/dbforge/mysql/studio/

  5. #5
    Member
    Real Name
    Tony Watts
    Join Date
    Mar 2010
    Posts
    442

    Default Re: email_send2() is not working

    Thanks guys!
    Steve your explanation about email_send2() and the highlighted profile got me on the right path and I now have it working! Thanks!!
    Frank, unless I'm not understanding how to use EMAIL_SMTP_OPEN(), I don't see that it allows for "from_alias" and "Cc" and that is something I really need.
    Thanks again to both of you for helping me out on this!
    Tony

  6. #6
    Member
    Real Name
    Tony Watts
    Join Date
    Mar 2010
    Posts
    442

    Default Re: email_send2() is not working

    Frank
    EMAIL_SMTP_OPEN(), EMAIL_SMTP_SEND() does do alias and cc, my mis step once again.
    Sorry and thanks for everyone's patience!
    Tony

Similar Threads

  1. email_send2 problem
    By frankbicknell in forum Mobile & Browser Applications
    Replies: 0
    Last Post: 05-15-2014, 09:38 AM
  2. Help with email_send2
    By frankbicknell in forum Application Server Version 11 - Web/Browser Applications
    Replies: 8
    Last Post: 10-24-2011, 08:39 AM
  3. email_send vs. email_send2
    By steinmanal in forum Application Server Version 10 - Web/Browser Applications
    Replies: 3
    Last Post: 01-12-2011, 12:49 PM
  4. Email_Send2() and WAS
    By LMOTCOB in forum Application Server Version 8
    Replies: 2
    Last Post: 04-02-2007, 09:00 AM
  5. email_send2 with 150+ letters.
    By CALocklin in forum Alpha Five Version 7
    Replies: 5
    Last Post: 02-15-2007, 10:36 AM

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
  •