New call-to-action
Results 1 to 2 of 2

Thread: Send email on submit

  1. #1
    Real Name
    Fernando Cruz
    Join Date
    Jun 2019

    Default Send email on submit

    I have a grid setup as a form for our job scheduling. Is there a way when I schedule a job and hit the submit button an email is sent out? I thought by creating an action script and placing it in client-side events would do it but no luck. This is what I had on afterRowSubmit: {grid.object}.runAction('Email_Status_Update');

    Thanks in Advance

  2. #2
    Real Name
    Fernando Cruz
    Join Date
    Jun 2019

    Default Re: Send email on submit

    **Update** after reading some other posts I believe I am to write some code in AfterUpdateRecord. This is what I came up with but still am having no luck. Can anyone see what I am doing wrong? Application is still working great, just no email being sent.

    dim pm as P
    dim ps as P
    dim OrderID as c = e.datasubmitted.OrderID
    dim DPStatus as c = e.datasubmitted.DPStatus
    dim DPInitials as c = e.datasubmitted.DPInitials
    dim Email as c = e.datasubmitted.Email
    dim ActualQtyDP as c = e.datasubmitted.ActualQtyDP
    dim Post as c = e.datasubmitted.Post

    if (email_smtp_open(ps,"",SSL Port# Here ,"","mypassword")) then
    pm.from = ""
    pm.from_alias = "" = "" **trying my email as test hard coded but still no luck** = ""
    pm.bcc = ""
    pm.subject = "DP Status for " +OrderID+ " has been updated to " +DPStatus+ " by " +DPInitials+""
    pm.html_message = "Actual Qty DP: <B>"+ActualQtyDP+"</B> <BR \><BR \> Postage Required: <B>"+Post+"</B> <BR \><BR \> <BR \><BR \> Please do not respond directly to this e-mail. The originating e-mail account is not monitored often."

    if (email_smtp_send(pm, ps) <> .f.) then
    dim msg as C = "Email sent"
    TRACE.writeLn(msg,"Email Log")
    dim msg as C = "Could not send email"
    TRACE.writeLn(msg,"Email Log")
    end if
    dim msg as C = "Could not connect to SMTP server"
    TRACE.writeLn(msg,"Email Log")
    end if

Similar Threads

  1. Submit UX and either print report or send by email
    By WindForce in forum Mobile & Browser Applications
    Replies: 1
    Last Post: 09-09-2019, 10:45 AM
  2. Inserting integer field into email using Send Email Javascript
    By dfricke10 in forum Application Server Version 11 - Web/Browser Applications
    Replies: 3
    Last Post: 09-02-2012, 09:51 PM
  3. Send email on submit.
    By George Morley in forum Application Server Version 10 - Web/Browser Applications
    Replies: 2
    Last Post: 10-15-2010, 12:02 PM
  4. Email will not send on hosted Application Server. Email Profile name?
    By iviowa in forum Application Server Version 9 - Web/Browser Applications
    Replies: 4
    Last Post: 11-17-2008, 06:50 PM
  5. Submit Button Won't Send Data
    By Rich Hartnett in forum Web Application Server v6
    Replies: 4
    Last Post: 10-23-2005, 02:51 PM


Posting Permissions

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