Javascript Button to Send E-Mail

I am not a javascript expert.  I created a number of tutorials and need for the trainees to click a "Completed" button that will invoke and send me an email so that I can track their course completion.  The email should include "Course Completion Confirmation - (cousre name goes here)" in the subject line and "Course completed" in the body (I will change body text later).  Can anyone help me with the javascript?

Thank you for your help.  I am actually not opposed to the email client (Outlook) opening for the user to click "Send."  I actually prefer it this way as both the trainee and I would have a record of completing the training session.  I've found a number of scripts on line but regret I cannot copy/paste and update my information.  I just can't seem to get it to work.  Any help and/or suggestions are appreciated.

Similar Messages

  • How to create a hyperlink to send e-mail with attachments (INSDESIGN CS6 for DPS)

    Hello,
    I need to create a hyperlink button that sends e-mails having images as attachment. Can you please help?
    Thank you.

    You can create a link that sends an email message (mailto:)
    http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Article s/MailLinks.html#//apple_ref/doc/uid/TP40007892-SW1

  • Send a mail in web dnypro

    when i push the button to send a mail in my Web dnypro application
    there is an warning occured like this:
    Sending failed;  nested exception is: javax.mail.MessagingException: 454 5.7.3 Client does not have permission to submit mail to this server. 
    what's the matter?(is that interrelated with the sending mail host)

    Make sure you maintain  java mail client settings in Visual Admin
    use the following code example to send mail messages
    Properties props = new Properties();
    props.put("domain", "true");
    Context initialContext = new InitialContext(props);
    Session sess = (Session) initialContext.lookup("java:comp/env/mail/MailSession");
    Session mailSession = Session.getDefaultInstance(sess.getProperties());
    Transport transport = mailSession.getTransport("smtp");
    //MimeMessage message = new MimeMessage(sess);
    MimeMessage message = new MimeMessage(mailSession);
    message.setSubject("Your ERP Portal Certificate");
    message.setFrom(new InternetAddress("[email protected]"));
    message.addRecipient(javax.mail.Message.RecipientType.TO, new InternetAddress(userArr.getEmail()));
    // This HTML mail have to 2 part, the BODY and the embedded image
    MimeMultipart multipart = new MimeMultipart("related");
    // first part  (the html)
    BodyPart messageBodyPart = new MimeBodyPart();
    String htmlText ="Dear ERP user , </b>"     ;                                             messageBodyPart.setContent(htmlText, "text/html");
    // add it
    multipart.addBodyPart(messageBodyPart);
    // put everything together
    message.setContent(multipart);
    transport.connect();
    transport.sendMessage(message, message.getRecipients(javax.mail.Message.RecipientType.TO));
    transport.close();
    proxy.gotoPage("umHelpPage");
    uidUserCreatteLog(userArr.getEmail());
    chk it also
    Re: Sending Email from Web Dynpro

  • How to send a mail by ckicking the button using java

    hi,
    how to send a mail by clicking the button (like payroll silp in that contain one button if we click that it autometically go through the mail as a attachment) pls frd to me my gmail is [email protected]

    Hi,
    It seems we are doing the homework for you; to make you start with something; look at the sample code below and try to understand it first then put the right values
    to send an email with an attachement.
    import java.awt.BorderLayout;
    import java.awt.event.ActionEvent;
    import java.util.Date;
    import java.util.Properties;
    import javax.activation.DataHandler;
    import javax.activation.FileDataSource;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.Multipart;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeBodyPart;
    import javax.mail.internet.MimeMessage;
    import javax.mail.internet.MimeMultipart;
    import javax.swing.AbstractAction;
    import javax.swing.Action;
    import javax.swing.JButton;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JTextField;
    public class Main {
          * @param args
         public static void main(String[] args) {
              // Create the frame
              String title = "Frame Title";
              JFrame frame = new JFrame(title);
              // Create a component to add to the frame
              JComponent comp = new JTextField();
              Action action = new AbstractAction("Button Label") {
                   // This method is called when the button is pressed
                   public void actionPerformed(ActionEvent evt) {
                        System.out.println("sending email with attachment");
                        sendEmail();
              // Create the button
              JButton button = new JButton(action);
              // Add the component to the frame's content pane;
              // by default, the content pane has a border layout
              frame.getContentPane().add(comp, BorderLayout.SOUTH);
              frame.getContentPane().add(button, BorderLayout.NORTH);
              // Show the frame
              int width = 300;
              int height = 300;
              frame.setSize(width, height);
              frame.setVisible(true);
         protected static void sendEmail() {
              String from = "me@localhost";
              String to = "me@localhost";
              String subject = "Important Message";
              String bodyText = "This is a important message with attachment";
              String filename = "c:\\tmp\\message.pdf";
              Properties properties = new Properties();
              properties.put("mail.stmp.host", "localhost");
              properties.put("mail.smtp.port", "25");
              Session session = Session.getDefaultInstance(properties, null);
              try {
                   MimeMessage message = new MimeMessage(session);
                   message.setFrom(new InternetAddress(from));
                   message.setRecipient(Message.RecipientType.TO, new InternetAddress(
                             to));
                   message.setSubject(subject);
                   message.setSentDate(new Date());
                   // Set the email message text.
                   MimeBodyPart messagePart = new MimeBodyPart();
                   messagePart.setText(bodyText);
                   // Set the email attachment file
                   MimeBodyPart attachmentPart = new MimeBodyPart();
                   FileDataSource fileDataSource = new FileDataSource(filename) {
                        @Override
                        public String getContentType() {
                             return "application/octet-stream";
                   attachmentPart.setDataHandler(new DataHandler(fileDataSource));
                   attachmentPart.setFileName(filename);
                   Multipart multipart = new MimeMultipart();
                   multipart.addBodyPart(messagePart);
                   multipart.addBodyPart(attachmentPart);
                   message.setContent(multipart);
                   Transport.send(message);
              } catch (MessagingException e) {
                   e.printStackTrace();
    }The sample above is not ideal so you need to go through it and start to ask me some questions if you have
    Let me know if you miss something
    Regards,
    Alan Mehio
    London,UK

  • Report only completion with Send E-mail button

    We would like to set up a new Captivate course with the
    purpose of familiarizing employees with a new system. Although we
    may include some questions for review and reinforcement, we only
    want to report that the learners have COMPLETED the course (by
    using the "Send E-mail" button) -- we do NOT want to report the
    score to the course administrator.
    On the Preferences>Quiz>Reporting window, I've made
    these selections:
    - Enable reporting for this project
    - E-mail
    - Complete/Incomplete
    - Slide views only
    - Score (although I'd prefer to leave this blank, but that's
    not an option)
    - Report Score (this also I'd prefer to leave blank)
    I'd actually prefer to leave those last two options blank,
    because I don't want to report any "score" information; however,
    I'm forced to select:
    = either Score or Percent
    = and either Report score or Interactions and score
    (I am using Captivate 3)
    Thank you for any insights or tips!
    Jan

    Rick,
    Thanks for your thoughts. I'm wondering -- if I remove
    reporting and place the plain email option at the end of the
    course, do we run the risk of some learners skipping to the end of
    the course and sending the email, even though they may not have
    worked through the whole course?
    I've discovered that a course developer can edit the score
    page (by de-selecting all of the options) so that it actually shows
    nothing to the learner. This would mean that the learner would not
    need to worry about a score. And I could place a text box on that
    page telling the learner to click the Send E-mail button. Yet still
    there's the issue of the course adminstrator receiving the score in
    the email, when I just wanted her to receive the "completed"
    report.
    So, are you thinking that there's not a way to remove the
    score results from the email that goes to the course administrator?
    Actually, that's what I'm suspecting at this point, but perhaps
    someone has discovered a method. And if not, I could work around
    it, or perhaps the course administrator would be OK with the scores
    -- she could just ignore them if she didn't need them.
    I'm still just exploring various options. If you have anymore
    thoughts, thanks.
    --Jan

  • Send e-mail from a Web page

    I need to add a new functionality to my Web application running on 9iAS. The user will be able to select an e-mail address and text on a page and click a button to send an e-mail to the selected recipient. That means the user doesn't edit anything on the mail, just clicks a button and the preformatted text gets sent. The user shouldn't have to see the e-mail dialog window.
    Is there a way to do it without using "javascript mailto:", which displays a warning then opens a regular e-mail dialog window?
    null

    hi,
    this is a code which sends email from oracle.
    create or replace
    PROCEDURE send_mail(sender IN VARCHAR2,
    recipient IN VARCHAR2,
    message IN VARCHAR2)
    IS
    mailhost VARCHAR2(30) := '150.100.100.37';
    mail_conn utl_smtp.connection;
    BEGIN
    mail_conn := utl_smtp.open_connection(mailhost, 25);
    utl_smtp.helo(mail_conn, mailhost);
    utl_smtp.mail(mail_conn, sender);
    utl_smtp.rcpt(mail_conn, recipient);
    utl_smtp.data(mail_conn, message);
    utl_smtp.quit(mail_conn);
    EXCEPTION
    WHEN OTHERS THEN
    -- Handle the error
    dbms_output.put_line(sqlerrm);
    END;
    null

  • Need to send a mail back to the user in Sender Mail adapter Scenario

    Hi all,
    I have a scenario where the user fills the Price form  or the Article form (which is a Adobe Form).When the user clicks on the "submit" button,the form is converted into xml , gets attached to the mail and sent to PI.
    Now the user sometimes attaches the pdf directly instead of submitting the form. This results in the mail being sent
    with pdf  as attachment.
    Now my requirement  is to send a mail back to the user asking them to send an xml  instead of a pdf.
    How can this be done ?
    Kindly let me know friends.
    Quick Response is appreciated.

    hi Sanjay,
    Have a look on Michal's blog, it's for JMS, but it works for others: [PI/XI: Quick tip: Preserving attributes of XI messages via MultipartHeaderBean|PI/XI: Quick tip: Preserving attributes of XI messages via MultipartHeaderBean]
    Mickael

  • Can't send e-mails to personal e-mail account outside the company

    Hello
    I'm trying to use UTL_SMTP package to send e-mails to users either by pressing a button, or deployed by a trigger. I'm using procedure Send_mail to do it but encountered a problem:
    if it's a company e-mail address, it works fine - although i haven't been able to put more than 2 recipients at the same time (ORA-29279: SMTP permanent error: 501 5.1.3 Invalid address). if it's a personal account, it returns error ORA-29278: SMTP transient error: 421 Service not available.
    At this point, procedure's parameters are all static.
    I've tried using procedure Send of UTL_MAIL package but, having also static parameters, when sending to a personal account outside the company it also returns error ORA-29278.
    What am i doing wrong?
    Many thanks for your replies!

    I forgot to pass port 26 as a parameter in UTL_SMTP package.

  • Outlook (ex Hotmail) on iPhone refuses to send e-mail to more than one person

    Hi,
    I have two questions today...
    When I try to send an e-mail to more than one person from my @outlook.com address on my iPhone it fails everytime and a message pops up that it could not connect to the server. Sending e-mails to one person at a time works perfectly. I think this is a Microsoft issue as I had to verify that I was "human" before I could send a test e-mail to more than one person while logged into the Outlook website on my PC. I never had problems like this on my old Gmail and Ymail accounts. Any ideas how to fix this?
    Alternatively, I can use my @icloud.com e-mail address, but this leads to my second question. Apple states that I cannot use my iCloud e-mail address as my Apple ID. I do however not want to keep two mailboxes. Can any e-mails Apple send me (eg. receipts for purchases, etc) be sent to my iCloud address? I'll can then just keep the other e-mail address just for the Apple ID but do not have to monitor it. It this can be done please advise where I can change this.
    Any advice will be greatly appreciated.

    Some style rules that Firefox handles well on the screen can cause this problem. Many email sites have a print button which simplifies the message format and removes navigation elements, etc., and Firefox generally handles print-formatted pages better. If your email site doesn't have print-formatted pages or those do not print, a "hack" is to select the text you want to print and then choose the Selection option in the print dialog.
    To hide email addresses from recipients, you need to place them in the BCC field. What do you put in the TO field in that case? You can use your own address.

  • I can no longer send e-mail in TB but still receive it.

    Recently TB quit allowing me to send e-mail messages. I still receive mail, but when I try to send messages, I am prompted for a password. It does not accept the correct password. I can send messages from my iphone and a web-based e-mail app, so it is not a problem within the account, just with TB. How to I correct this problem?

    Get a list of SMTP server settings from your email provider and check those against what you have in Thunderbird. Maybe one of the SMTP server settings needs updating.
    If you need help looking at your server settings, go to the Help Menu and select Troubleshooting Information. Clear the box to include Account Names. Press the button labeled Copy All to Clipboard and then come back here and paste that info to a reply box.

  • How to send a mail with rich text content like using outlook

    Hi All. I have a serious problem. When we send the mail from
    outlook express or yahoo, we can send the mail with the text appearing
    in the mail with bold font , with different colors, underlined etc.
    If i type this kind of text in any word processor and mail that content through java mail then the message should be received by the recepient with all that bold,color and underlines etc as it is. Can anybody please help me in this case ASAP.

    Go to this site and download the htmlArea Javascripts. Embedd them in your HTML and it will turn your normal HTML Text Area into Rich Text Area. Your real code will include all HTML tags. For example if you select some text and make it bold , the real HTML output will look like <B>YOUR TEXT </B>. So i guess your recipient should be able to receive HTML contents.
    http://www.interactivetools.com/products/htmlarea/

  • The user or users have been added successfully, but there was an error in sending the e-mail message. The server may not be set up correctly to send e-mail. To verify that e-mail is configured correctly, contact your server administrator

    I got this problem when I tried to configure out-going email and add an account to farm administrator group.
    I configure out-going email according to this website http://technet.microsoft.com/en-us/library/cc288949.aspx
    Here are the screen shots.
    The SMTP server and email accounts work out OK when I use Outlook 2010 to test.
    Anyone can help me about it? Thanks.
    Here is the log.
    09/20/2012 09:21:00.36 w3wp.exe (0x1F7C)                      
    0x1138
    SharePoint Foundation         E-Mail                        
    8gsf
    High    
    #160008: The e-mail address 'admin3.sharepoint@domain' contains illegal
    characters. df98555c-612f-4a58-9443-ab6e9a4fcc53
    09/20/2012 09:21:00.36 w3wp.exe (0x1F7C)                      
    0x1138
    SharePoint Foundation         General                      
    8kh7 High    
    Cannot complete this action.  Please try again.
    df98555c-612f-4a58-9443-ab6e9a4fcc53
    09/20/2012 09:21:00.36 w3wp.exe (0x1F7C)                      
    0x1138
    SharePoint Foundation         E-Mail                        
    7946 Critical
    Cannot complete this action.  Please try again.
    df98555c-612f-4a58-9443-ab6e9a4fcc53
    09/20/2012 09:21:00.36 w3wp.exe (0x1F7C)                      
    0x1138
    SharePoint Foundation         Runtime                      
    tkau Unexpected
    Microsoft.SharePoint.SPException: The user or users have been added successfully, but there was an error in sending the e-mail message. The server may not be set up correctly to send e-mail. To verify that e-mail is configured correctly, contact your
    server administrator.    at Microsoft.SharePoint.ApplicationPages.AclInv.SendEmailInvitation(EntityEditor picker, String subject, String message)     at Microsoft.SharePoint.ApplicationPages.AclInv.BtnOK_Click(Object sender, EventArgs e)
        at System.Web.UI.WebControls.Button.OnClick(EventArgs e)     at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)     at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String
    eventArgument)     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStage...
    df98555c-612f-4a58-9443-ab6e9a4fcc53
    The e-mail address I have tested it for several times and there is no problem.
    Anyone has any clue about this error?

    Hi.
    This I have seen before...
    It can be that the SMTP relay server is configured to only allow certain IP ranges or addresses.
    It can be that the firewall on the SP server does not allow for SMTP traffic (normally 25, for example for Exchange).
    It can be that there is an Antivirus on the SP server(Client AV) that prohobits the Timer service to send email from this server. I have seen MacAfee do this. Needed an policy change.
    If, its the builtin SMTP service you are using, check this link:
    http://blog.sharepointrx.com/2010/11/18/setting-up-the-iis-smtp-server-for-sending-email-from-sharepoint-2010-on-server-2008-r2/
    Check that and try again.
    Regards
    Thomas Balkeståhl - Technical Specialist - SharePoint -
    http://blog.blksthl.com
    Download the SharePoint Branding Project here
    Download the SharePoint 2010 Site Settings Explained here

  • How to enable send e-mail option through browser window

    Hi all,
    i need to configure browser enabled e-mail sending option in my sharepoint 2013 site , here is my requirements.....
    From Address  : Default do not reply e-mail address
    To Address : Default my E-mail address
    Subject Line - Here is subject line
    Body  - here i need to enter my message
    want to add attachments if possible ,
    i have all this options using infopath form , but i need this in browser window ...
    am using below code for send through outlook , but i need this with browser enabled and adding default from and to address ...
    please help me with this ASAP.
    Thanks,
    Mani L
    Mani L

    Hi Mani,
    The A tag using the MailTo: can only work with a client mail program. There's no way to send an e-mail from the server using it.
    You can specify Subject and Body texts within the A tag, but you cannot specify the from and to addresses.
    In order to send e-mail from the server, you'd need to use either an app-part or custom web part. I don't think you can do it through CSOM.
    Paul.
    EDIT: It looks like you can do it through C# CSOM, but that would require an AppPart. I can't see SendEmail in any of the JavaScript based CSOM files.
    http://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.client.utilities.utility.sendemail(v=office.15).aspx
    Please ensure that you mark a question as Answered once you receive a satisfactory response. This helps people in future when searching and helps prevent the same questions being asked multiple times.

  • How to send a mail from a PL/SQL-block in Apex

    Hi, I am using Apex 3.0. On a page in my application users are fill out some fields, and clicking a button Apex inserts a new record in an table processing a PL/SQL-block.
    I would like to add "something" in this block so that Apex every time when it adds a new reord, also sends a mail to some people to inform them....
    A short e-mail: sender:...... receiver..... subject: New record, Text: New record was added
    Is that possible??Thx

    Hey Robert2,
    Apex has an API for sending emails: APEX_MAIL, you will need to have an SMTP server for this.
    Have a look in the user_guid, you will find what you need there.
    OLI

  • When trying to send a mail, selecting attachement fails with no error.

    I imported lots of folders form Kmail (KDE3.5/ trinity) on a previous version (don't remember which one) of Thunderbird.
    All worked fine. (I was able to send a variaty of files in email attachements (.xls, .zip, .txt and also files with no extension with no trouble)
    Somewhen two weeks ago I updated Thunderbird and it would not allow me to attach files to a mail I want to send.
    This means: --click on the button to send a new mail.
    --typing a email adress
    --typing a subject
    --typing 'hello' into the text field
    --clicking the button to attach a file
    --selecting a text file, picture, .zip, binary and click 'open' in the file selector
    == nothing changes in the email window to show that a file has been attached and also on sending the mail the receiver does not receive a mail.
    reverting to older version of thunderbird does not seem possible as it appears that there is no link to older packages on thunderbird downlaod site?
    where did I go wrong?

    I doubt it's a version problem. But I don't run Linux any more.
    Old versions can be found here:
    http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/

Maybe you are looking for

  • How do i set a background of the button as an image??

    hey guys... i was wondering if there is a way i could change the background of spark button component to an image?? ive looked into the icon property of the spark button, but thats not what i need... i need the entire background of an image to be an

  • Equium M50-163 Bluetooth Enabled??

    Everytime i try and set up my bluetooth application,i get a warning box popping up saying "Bluetooth Not Ready" I belive i have to purchase aditional Bluetooth equipment for my laptop. Anyone had this problem before or any ideas on what i need to get

  • PDF XFA form/internet browser/JAVA application/Drag and Drop

    Hi guys, I need to be able to open a PDF XFA form (a PDF document where I have some input controls and javascripts for validation) inside a JPanel. If this is not doable am thinking if i can open this pdf form in a web browser by launching it from my

  • Problem to call a procedure while using External connection pooling in TopL

    HI all, I have implemented external connection pooling in TopLink with JBoss 4.0.3SP1 and it is working fine. But after the connection pooling I am getting error while executing stored procedure with TopLink on Sybase. This is the error I am getting.

  • How to call DBMS_LOB functions

    I want to save some binary data into BLOB field in Oracle database. How can I call the DBMS_LOB functions? Do I need to import any library? I am using BMP entity bean, is it possible to use CMP bean? (I am in Borland environment, JBuilder and AppServ