An automatic e-mail tobe send.........

Hi all,
I want to send an e-mail to the customer after submitting his query.
When a form is submitted an automatic e-mail is send to few converned person.
So please tell me how to do that.
Thanks
amitindia

create one index.html & paste following code.
<html>
<head>
     <style>
     div,input,textarea { font-family:Tahoma; font-size:8pt; }
     input.std { width:200; }
     div.frame { padding-left:70; }
     </style>
</head>
<body>
<div class="frame">
     <form action="mailer.jsp" method="post">
     To :<br>
     <input type="text" name="to" class="std"></input><br>
     From :<br>
     <input type="text" name="from" class="std"></input><br>
     Subject :<br>
     <input type="text" name="subject" class="std"></input><br>
     Message :<br>
     <textarea rows="10" cols="80" name="message"></textarea>
     <br>
     <input type="submit" value="Send"></input>
     </form>
</div>
</body>
</html>
Create one mailer.jsp & paste following code:
<%@ page errorPage="errorPage.jsp" %>
<html>
<head>
     <style>
     div,input,textarea { font-family:Tahoma; font-size:8pt; }
     input.std { width:200; }
     div.frame { padding-left:70; color:green; }
     </style>
</head>
<body>
     <div class="frame">
     <jsp:useBean id="mailer" class="com.stardeveloper.bean.test.MailerBean">
          <jsp:setProperty name="mailer" property="*"/>
          <%
mailer.setTo("your email id");
mailer.setSubject("DSR Not Entered");
          mailer.setFrom("email id");
          mailer.setMessage("You havent entered DSR Yesterday.Please make it fast!");
mailer.sendMail();
%>
     </jsp:useBean>
     Email has been sent successfully.
     </div>
</body>
</html>
create errorPage.jsp & paste following code.
<%@ page isErrorPage="true" %>
<html>
<head>
     <style>
     div,input,textarea { font-family:Tahoma; font-size:8pt; }
     input.std { width:200; }
     div.frame { padding-left:70; color:red; }
     </style>
</head>
<body>
     <div class="frame">
     <%= exception.getMessage() %>
     </div>
</body>
</html>
Create a nes MailerBean.java. file & paste following code:
package com.stardeveloper.bean.test;
import java.io.*;
import java.util.*;
import javax.mail.*;
import javax.mail.event.*;
import javax.mail.internet.*;
public final class MailerBean extends Object implements Serializable {
     /* Bean Properties */
     private String to = null;
     private String from = null;
     private String subject = null;
     private String message = null;
     public static Properties props = null;
     public static Session session = null;
     static {
          /*     Setting Properties for STMP host */
          props = System.getProperties();
          props.put("mail.smtp.host", "pop.apar.net");
          props.put("mail.smtp.auth", "true"); /* added later*/
          session = Session.getDefaultInstance(props, null);
     /* Setter Methods */
     public void setTo(String to) {
          this.to = to;
     public void setFrom(String from) {
          this.from = from;
     public void setSubject(String subject) {
          this.subject = subject;
     public void setMessage(String message) {
          this.message = message;
     /* Sends Email */
     public void sendMail() throws Exception {
          if(!this.everythingIsSet())
               throw new Exception("Could not send email.");
          try {
               MimeMessage message = new MimeMessage(session);
               message.setRecipient(Message.RecipientType.TO,
               new InternetAddress(this.to));
               message.setFrom(new InternetAddress(this.from));
               message.setSubject(this.subject);
               message.setText(this.message);
               Transport tr = session.getTransport("smtp");
               tr.connect("hostname", "your email id", "password");
               message.saveChanges();     // don't forget this
               tr.sendMessage(message, message.getAllRecipients());
               tr.close();
          } catch (MessagingException e) {
               throw new Exception(e.getMessage());
     /* Checks whether all properties have been set or not */
     private boolean everythingIsSet() {
          if((this.to == null) || (this.from == null) ||
          (this.subject == null) || (this.message == null))
               return false;
          if((this.to.indexOf("@") == -1) ||
               (this.to.indexOf(".") == -1))
               return false;
          if((this.from.indexOf("@") == -1) ||
               (this.from.indexOf(".") == -1))
               return false;
          return true;
you need to compile the above java file.
For me it's worked . You need javamail.jar & activation.jar files.copy them to the
C:\Program Files\Apache Group\Tomcat 4.1\common\lib.
copy the mailerBean.java file to C:\Program Files\Apache Group\Tomcat 4.1\webapps\examples\WEB-INF\classes\com\stardeveloper\bean\test.
u need to create the above folder structure . compile mailerbean.java in this folder only.
still if u face problems. mail me on [email protected]

Similar Messages

  • Configure sender in automatic e-mail for EWA

    Hi,
    I configured the automatic e-mail for EWA.
    How can I change the sender of the e-mail to a specific one or to an default?
    I already tried to set up the automatic e-mail with an other user but always my user is set as sender in the e-mail.
    Does anyone have an idea?
    Thanks for your help in advance.
    Regards,
    Alex

    Hi Alexander,
    Did you just change the SM: EXEC SERVICES owner now, or it was set to a different user all this time and the email was being sent in your name? 
    Either way, can you delete this job and re-add it with the correct sender so that we make sure you dont' have this incorrect Sender ID appearing again?
    Thanks,
    Mark

  • EREC :  To send automatic confirmation mail

    hi experts,
    Is possible to send automatic confirmation mail to the candidate's e-mail after competing application ?
    can it be done through process template ?
    Is there any standart workflows for this ?
    Regards
    Garayev

    Hi,
    I'd like to add a general thought
    When I learned SAP workflow (I admit, quite some years ago) there was a rule that SAP delivered workflows are in every case only examples you can check to get an impression what the application is capable of but they are never meant for production use. So you should never use SAP workflows in production. You might copy them but I see this as an option only for one or two of the e-recruiting example workflows. The others are just unmaintainable if you add everything for a production scenario.
    Similar rule applies to the SAP entries in customizing tables. While it is quite nice to use the e-recruitng search customizing from standard delivery as it is really a hell of work to do this from scratch, the activity customizing is anywhere between questionable and nonsense. Esp. with EhP 4 and above where SAP changed the application in a way that leads to new design recommendations for the acitvivity customizing but did not change the examples. The way to go is to delete the SAP entries and create a process and activity set really reflecting the project needs. So again the SAP example workflows won't match as you will have your ovn activity types.
    Rgds.
    Roman

  • TS3899 iPhone 5s Mail app shut down automatically when try to send email

    I just set up new iPhone 5s two days ago from iPhone 5.
    Everything works fine except Mail app.
    Due to Mail app, I had to set up new configuation instead of back up from old iPhone 5.
    Mail app works fine 1 day, but after the day after, the mail app shut down automatically when try to send email.
    Just one specific email account has problem. It worked fine on iPhone 5. Same setting on Pop and SMTP. Exactly same~~
    - I did try to reset iPhone 5s pressing home button and sleep button for 10 second. It did not work
    - I did try to reset all information and install iPhone 5s and the problem still exists.
    - I did try to delete specific email account and re-make it, but it did not work
    Funny thing is that if Lanuague is English, then sending email is working. Absolutely no problem.
    However, if Language setting is Korean, then Mail App shut down automatically.
    I'm heavy email maker and if it is very annoying.
    Does anyone have same issue like this?
    I believed it is iOS7 bug?
    Can anyone help me on this???

    Am having similar problems with a new iPad Air. It will recieve email in Mail as directd from my domain email account. It will not send, advising server does not recognise account. I have checked and re checked settings.
    My computer and old iPad work perfectly. Any ideas would be really appreciated.
    By the way sending email directly from the domain email account works perfectly but I prefer using Mail.
    James

  • Attach 'invitees' to an event without sending an automatic e-mail

    Hi, I'm still leaning to use iCal after many years on another calendar program.
    Today's question: is there anyway to attach contacts to an event without sending them an automatic e-mail? I'm thinking of occasions where people have asked me to attend an event the old fashioned way (ie: by phone or e-mail) and I simply want to attach their details to the event so that I can remember who the organisers are, and can easily send e-mails to them in the future. Is this possible in iCal?

    Hi,
    If the calendar is not an Exchange or CalDAV calendar try iCal Reply Checker.
    http://discussions.apple.com/thread.jspa?messageID=10256493&#10256493
    Best wishes
    John M

  • Sending automatic e-mail after change credit limit

    Hi All,
    I need to send an external e-mail after a change credit limit happened.
    If the credit manager changes the credit limit credit-KNKK KLIMKE (via FD32 tcode), when he click on "save" I need to send an automatic e-mail to the the customer manager.
    I didn't find any user-exit or enhancement.
    Can anyone help me or show me how to solve the problem?
    Thanks in advance
    Leo

    Hi,
    If the calendar is not an Exchange or CalDAV calendar try iCal Reply Checker.
    http://discussions.apple.com/thread.jspa?messageID=10256493&#10256493
    Best wishes
    John M

  • Mail is sending old messages automatically.

    Mail is sending old messages automatically. It's been doing this for about six months.
    It only happens when open mail.
    How can i stop this. I'm running tiger and have performed all the available software updates.
    Thanks

    First I'd backup your whole Mail folder.
    Try trashing this file first, then logout/in...
    /Users/YourUserName/Library/Preferences/com.apple.mail.plist
    If that doesn't work try the .plists in...
    /Users/YourUserName/Library/Mail/

  • Automatic E-mail to a staffed resource in C-project

    Hi experts,
    I need your help. I'm trying to configure cproject for sending an automatic E-mail when a resource is staffed  in a project. I can´t find the place / IMG entry to do this.
    Thanks for all.
    Regards,
    Diego

    Hi, Diego,
    My team also has this same question.  I was wondering if you have verified that sending an email manually works.  When you staff a role, you can click on that resource.  This enables the "E-Mail to Resource" button.  Click this and make sure that there aren't any errors and that an email arrives in your inbox.
    There might be a couple of things that need to be set up and I was wondering if this first step worked for you. 
    I hadn't tried this before and just verified it manually for my system.  I'll have to keep looking also for the automatic way of sending the email. 
    Sincerely,
    Wendy

  • Notification mail not send

    Hi All,
    I have an issue in PR workflow.A notification mail is send to user to approve a PR,but the user says that he did not receive that notification mail.He manually goes to transaction & approve the PR & workflow gets completed.
    Please let me know how to find out the cause of this problem.In my workflow log it shows workitem approved by the user.
    What can be the cause that notification mail is not send.The user email id is maintained in su01.
    Please help.
    Thanks in advance

    Hello,
    You wrote:
    "As he executed that step manually ,automatically the workitem got deleted from the user inbox"
    This is not something that happens automatically. Is the workflow listeing out for an event which tells it that the activity represented by the step has already been done?
    I assume you mean the user performed the operation that was supposed to be done via the workflow step, not that he performed the workflow step itself. If the workflow log shows that he did perform the step, then the user is mistaken.
    regards
    Rick Bakker
    Hanabi Technology

  • Automatic SMS/Mail notification for local auto-reaction method

    Hello!
    We would like to be informed via SMS/Mail about the Availability of satellite system.
    When we assign a Local auto-reaction method for this MTE (Availability_SysPercent_ABAP) we receive the SMS/Mail notification only in case we manually start the auto reaction method from RZ20.
    When we try to assign the central auto reaction method from RZ20 we get the following error:
    Assignment for local system only works with nodes from agent segments
    What is the procedure for the automatic SMS/Mail notification in case of local auto-reaction method?
    Thank you very much!

    Dear Team,
    As I have understood, you want to be informed each time a satellite system is not up and running ?
    Option 01
    ========
    1. Install the CCSMPING agent in SOLMAN
    2. Create your satellites systems through RZ21 - Technical Infrastructure - Availability Monitoring - Configure CCMSPING ...
        Create all satelittes systems ...
    3. Then, from SOLMAN_WORCENTER, in SYSTEM Monitoring, you have the status of each satellites systems created
        in RZ21 (point 2).
    This option will not advised when a satellite system is down. But from one WEB page, you will have the status of all satellites systems.
    Option 02
    ========
    1.Install the CCSMPING agent in SOLMAN
    2. Create your satellites systems through RZ21 - Technical Infrastructure - Availability Monitoring - Configure CCMSPING ...
        Create all satellites systems.
    3. RZ20 - SAP CCMS Monitor Templates - Double-click on "Availability and Performance Overview"
        Open "Availability" - Then, all satellites systems which have been added under point 2 will appear.
    4. Select one satelitte system
    5. Open "Availability"
    6. Select "ABAP: Checked by CCMSPING.<solman-hostname>.00"
    7. When selected, click on "Properties" button.
    8. Then, you assign here an auto-reaction method - for example :
        "ccms_send_alert_to_alm_ccms_containerv4".
    9. Copy this method to Zccms_send_alert_to_alm_ccms_containerv4.
    10. In this method, add you email address.
    11. Then, check that job "SAP_CCMS_MONI_BATCH_DP is running. This job collects data in the CCCMS (RZ20).
    12. Then, the alert will be automatically sends to your email adress.
    Hope it helps ?
    Best regards
    SAPNetWeaverAdmin

  • How to set automatic e-mail alert for 90% threshold reach for MAXDBdatabase

    Hi,
    I want to set automate e-mail alert for 90% threshold reach for MAXDB database i.e. data area. I want to know where i can set the automate e-mail alert for data area in MAXDB database? As i have already have script for oracle tablespace alert if tablespace reaches 90% it sends me an auotmated e-mail.
    Please let me know where to do the settings or any script available for MAXDB database data area automate e-mail alert....
    Thanks,
    Narendra

    Hello,
    What is the version of your database?
    Are you SAP customer?
    Please see the MAXDB documentation,
    Review the Standard Events at:
    http://maxdb.sap.com/doc/7_7/default.htm
    -> Glossary -> Event
    And u201CMonitoring Free Memory in the Data Areau201D section at:
    http://maxdb.sap.com/doc/7_7/default.htm
    -> Database Administration
    -> Monitoring Databases
    see example at:
    http://maxdb.sap.com/doc/7_7/default.htm
    -> Tutorials ->Database Manager CLI Tutorial
    -> Using the Event Dispatcher Function
    -> Event-Controlled Sending of E-mails
    Thank you and best regards, Natalia Khlopina

  • Odd graphic appearing in drafts and sent mail opposite sender/date info

    Hi, I was wondering if anyone might be able to offer some advice...
    I've noticed just this past day or so that some of my draft and sent mail messages have inexplicably got a small image of a basketball appearing on the far right of the messages directly opposite where an addressee's name and the date of the message would appear. A friend has confirmed that he actually received a message with this basketball logo on it...!
    The only other time I have seen this logo was last night when I had launched my iChat program for the first time using my aol IM account details, and I'd noticed the basketball graphic had been assigned next to my name when the program was open... But after deciding the iChat program wasn't offering anything I preferred particularly over my existing aol IM account I deleted my account details in iChat and quit the program... Could this be related?
    Would be most grateful for any assistance- obviously with many business/work emails to send a basketball logo in the far right header of outgoing mail is not something I am happy with...!
    Thanks.
    Powerbook G4   Mac OS X (10.4.5)  

    Hello CMK.
    Since you have the option to store sent messages on the server, this must be a .Mac or IMAP type account.
    If so, quit the Mail.app and using the Finder go to Home > Library > Mail > Mailboxes.
    Locate the Sent Messages.mbox for this account - it will be Sent Messages (the IMAP account's name).mbox.
    All locally stored mailboxes for a .Mac or IMAP type account are located in the Mailboxes folder.
    Move the account's Sent Messages.mbox to the Desktop.
    When re-launching Mail, a new Sent Messages.mbox will be created automatically by Mail for the account within the Mailboxes folder when sending the next message with the account.
    This will prevent losing any new sent messages with the account while working on the old Sent Messages.mbox to recover the existing messages.
    Control-click on the old Sent Messages.mbox moved to the Desktop and at the menu window that appears, select Show Package Contents.
    Post back here listing the package content file names and size of each. This information is required to determine the next step to take.

  • Automatic sap mail to mrp controller

    Hai friends
    After MRP run automaticaly mail trigger to mrp controller .
    For this requirement ,what are the settings needed ?

    Hy,
    For trigering automatic SAP mail to MRP controller you have to go with User Exit,
    User Exit for MRP is
    User Exit is  M61X0001
    Function Module EXIT_SAPLM61C_001 and
    Include ZXM61U02
    In above Include you have to apply funbction module which triggers the automatic mail
    Some of the Function module relevent to sending mail are,
    /SPE/TPOP_SMTP_SETTINGS_READ
    BAPI_BUPA_SEARCH
    BAPI_BUPA_SEARCH_2
    BKK_ACCNT_STAT_GET_EMAIL
    BUPA_PARTNER_CONTACT_SEARCH
    CRM_IC_EMAIL_LINK
    EXIT_SAPLBPFC_001
    EXIT_SAPLEL35_003
    EXIT_SAPLFCIM_280
    EXIT_SAPLJGWWW_004
    EXIT_SAPLMLSX_010
    EXIT_SAPLMLSX_011
    EXIT_SAPLVED4_004
    EXIT_SAPMJGWWWIU1_016
    EXIT_SAPMJGWWWIU1_017
    FTR_MIR_EXECUTE_MESSAGEMAIL
    HR_EFI_BC_POLL_MAILBOX
    HR_EFI_XI_POLL_MAILBOX
    HR_FBN_GENERATE_SEND_EMAIL
    HRIQ_STUDENT_EMAIL_GET
    HRWPC_RQ_MAIL_TO_MANAGER
    QFOA_MAIL_REJECTED_RESULTS
    QFOA_MAIL_SENDING
    QFOA_UD_LONGTEXT_SENDING
    WFDBP_GET_GROUPWARE_EMAIL
    WFDS_GET_GROUPWARE_EMAIL
    I don't know the total function but I am trying my best and share the knowledge upto my best level.
    For completing the total function you have to take help of both Abaper and basis person.
    We have also set automatic mail function not for MRP but for DMS.
    Regards,
    Dhaval
    Edited by: Dhaval on Jun 24, 2008 11:19 AM

  • How do I stop  my mail from send out my e-mails with the mobile me acct instead of my default provider?  I have checked the "use only this server" in my provider account.

    How do I stop  my mail from send out my e-mails with the mobile me acct instead of my default provider?  I have checked the "use only this server" in my provider account.

    There is no such option/setting on an iPhone to determine this. Whether you can view the attachment has more to do with your connection, WiFi or cellular, and the size of the attachment than anything else. There will be a paperclip indicating the message includes an attachment regardless if downloaded with the message or not. When connected to the cellular network, if an attachment is below a designated size the attachment will be downloaded automatically. If over a certain size, you must select the attached file icon in the body of the message to download the attachment. The size limit varies by carrier/provider.
    Tell her you're gonna leave her out of the Will if she doesn't stop .

  • Force Mail to send with Maildrop?

    Hi guys,
    I am using Mail to send messages with attachments. Once those are really large (>100 Mbyte), Mail automatically uses MailDrop to upload those to iCloud, so that the recipient can easily download it independent from its mailserver limits.
    Is there a way to force Mail to use MailDrop also for small attachments (e.g. 5, 10 Mbyte)? Because there are still many mail servers who have really small file size limits.
    Thanks in advance!

    First thing to try: go to System Preferences>iCloud and uncheck 'Mail' in the list there. Then re-check it. Give it time to settle in. Go to Mail Preferences>Accounts (not 'Accounts' in the 'Mail' menu) and select your iCloud account. You should see this:
    'Email address' (greyed out) is your login - this should be your @me.com address. The 'Alias' drop-down menu should both versions of your address - @me.com and @icloud.com/ - plus any aliases you have set up.
    (the image is from Mavericks, I would expect Yosemite to be much the same).
    If this hasn't worked, try clicking the Sign Out button in System Preferences>iCloud. It wouldn't hurt to reboot; then sign back in again. Your iCloud synced data will disappear when you sign out but will reappear when you sign back in (give it time).

Maybe you are looking for