Alpha Video Training
Results 1 to 2 of 2

Thread: Send email on submit

  1. #1
    Member
    Real Name
    Fernando Cruz
    Join Date
    Jun 2019
    Posts
    27

    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
    Member
    Real Name
    Fernando Cruz
    Join Date
    Jun 2019
    Posts
    27

    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,"smtp.serverhere.com",SSL Port# Here ,"myusername@mycompany.com","mypassword")) then
    pm.from = "myemail@company.com"
    pm.from_alias = ""
    pm.to = "myemail@company.com" **trying my email as test hard coded but still no luck**
    pm.cc = ""
    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")
    else
    dim msg as C = "Could not send email"
    TRACE.writeLn(msg,"Email Log")
    end if
    else
    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, 11: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, 10: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, 01: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, 07: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, 03:51 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
  •