Sending emails from the JSP application

hi,
I am trying to send emails from my jsp application using JavaMail API's.
I am using my own mailserver.
Iam able to send emails from my applications to the ids of my own mailserver but not the yahoo,gmail and rediff ids.
Is it because of blocking of any firewall or somthing else to do within my application?
Can anyone help me in this?
Thanks a lot.

Please read the JavaMail FAQ.
It's probably due to the configuration of your mail server,
which is refusing to relay your messages.

Similar Messages

  • Sending Email From a JSP Page

    Hi All,
    Can anybody tell me how to send email from the jsp page. My requirement is to send email to the user when he click on a button on the jsp page.
    thanks and regards
    MSoldier

    You need to install an SMTP server, or access an existing one.
    Contact your network administrator about this, he should be able to help you.
    PLEASE don't go around installing your own mailservers on the internet unless you know very well what you're doing, as most of those are wide open to abuse by spammers and people spreading email virusses as relays (plus it's likely against company or ISP policy).
    And NEVER use someone else's servers without their consent to send email.

  • How to setup adobe to send emails from the application?

    How to setup adobe to send emails from the application?

    Click Edit>Preferences and select the Email Account Preferences
    Click Add Account and select “Add other…” or if you use Gmail or Yahoo mail, select the appropriate choice for it.
    Enter your Email Account info and then click “Advanced Settings” and configure your incoming and outgoing mail settings per your email account in Outlook, Thunderbird or mail service.
    Click OK, and click Add. The new Email Account will now appear in your listed accounts.
    Click the new account and click “Make Default”
    The checkmark will indicate the new account is set as the default Email Account for Reader.

  • Send email from the server

    I need to send email from the database.
    Two ways that I am familiar with -
    1. using VB/ODBC controls;
    2. dbms_pipe
    Anyone knows a more 'direct' solution?
    Regards
    Anatoliy Smirnov
    null

    by the way how can u send attchments with mails from database.
    chetan
    try this...(thanks for the subject line help)
    the first message line will be read by non MIME compliant readers, the second message line with be in the body of the note, the nest 2 (third and fourth) will come in as attachments ( text ). Change the Content-type for things like word docs or other 8bit docs (Content-type: application/msword) and write_raw_data for the 8Bit parts
    CREATE OR REPLACE PROCEDURE send_mail_test (sender IN VARCHAR2,
    recipient IN VARCHAR2, subject IN VARCHAR2,
    message IN VARCHAR2)
    IS
    mailhost VARCHAR2(30) := 'smtp.naxs.net';
    mail_conn utl_smtp.connection;
    cv_cCRLF VARCHAR2(10) := UTL_TCP.CRLF;
    lv_message varchar2(4000);
    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.open_data(mail_conn);
    utl_smtp.write_data(mail_conn,'From: ' | | sender | | cv_cCRLF);
    utl_smtp.write_data(mail_conn,'To: ' | | recipient | | cv_cCRLF);
    utl_smtp.write_data(mail_conn,'Subject:' | | subject | | cv_cCRLF);
    utl_smtp.write_data(mail_conn,'MIME-Version: 1.0' | | cv_cCRLF);
    utl_smtp.write_data(mail_conn,'Content-Type: multipart/mixed; ');
    utl_smtp.write_data(mail_conn,'boundary="NextPart_000_01C002D3.EB460626"' | | cv_cCRLF);
    utl_smtp.write_data(mail_conn, cv_cCRLF | | message| |' first mess part'| | cv_cCRLF);
    utl_smtp.write_data(mail_conn,'--NextPart_000_01C002D3.EB460626' | | cv_cCRLF);
    utl_smtp.write_data(mail_conn, cv_cCRLF | | message| | ' second mess part'| | cv_cCRLF);
    utl_smtp.write_data(mail_conn,'--NextPart_000_01C002D3.EB460626' | | cv_cCRLF);
    utl_smtp.write_data(mail_conn,'Content-Type: text/plain; charset=us-ascii'| | cv_cCRLF);
    utl_smtp.write_data(mail_conn, cv_cCRLF | | message| | ' third mess part'| |cv_cCRLF);
    utl_smtp.write_data(mail_conn,'--NextPart_000_01C002D3.EB460626' | | cv_cCRLF);
    utl_smtp.write_data(mail_conn,'Content-Type: text/plain; charset=us-ascii'| | cv_cCRLF);
    utl_smtp.write_data(mail_conn, cv_cCRLF | | message| | ' fourth mess part'| |cv_cCRLF);
    utl_smtp.write_data(mail_conn,'--NextPart_000_01C002D3.EB460626--' | | cv_cCRLF);
    utl_smtp.close_data(mail_conn);
    -- utl_smtp.data(mail_conn, message);
    utl_smtp.quit(mail_conn);
    EXCEPTION
    WHEN OTHERS
    THEN
    DECLARE
    error_code NUMBER := SQLCODE;
    error_msg VARCHAR2(2000) := SQLERRM;
    error_info VARCHAR2(30);
    BEGIN
    DBMS_OUTPUT.PUT_LINE('We have an error: '| |error_code| |' '| |error_msg);
    END;
    END;
    show errors;
    null

  • We purchased a new iPad2 and registered it using a 'new' iCloud email/ID. We are unable to send email from the iPad and iPhone. The error is: Cannot send mail. The user name or password for iCloud is incorrect.

    We purchased a new iPad2 and registered it using a 'new' iCloud email/ID. We are unable to send email from the iPad and iPhone. The error is:>> Cannot send mail. The user name or password for iCloud is incorrect.

    About ~20 hours later, this ended up solving itself. We can send email using the '.icloud' email from both the iPad and iPhone.  Advise would be 'wait' before you start seeking alteranatives like yahoo, hotmail, etc.  This definitely is a convenient way to keep all your 'cloud' information in a centralized place, including the common email...

  • TS3276 I cannot connect to my outgoing email server on my macBook pro, yet I can, for the same email account on my iPad. Also I can send emails from the other email account I have on my MacBook...really confused can anyone help?

    I cannot connect to my outgoing email server on my macBook pro, yet I can, for the same email account on my iPad. Also I can send emails from the other email account I have on my MacBook...really confused can anyone help?

    Sometimes deleting the account and then re-creating it can solve this issue
    Write down all the information in accounts before doing this
    Highlight the account on the left and click the minus button
    Then click the plus button to add the new account and follow the prompts

  • TS3899 When sending email from the Mail App or through other Apps, my default From: address will change when I enter a To: address.  This sometimes leads me to send the email from the wrong outgoing email account.  It is frustrating and poor design.

    When sending email from the Mail App or through other Apps on my iPad, my default From: address will change when I enter a To: address.  This sometimes leads me to send the email from the wrong outgoing email account.  It is frustrating and poor design, especially since I had already checked the From: address.
    iPad 4 running iOS 8.1.3

    3rd party email addresses have to be deleted on every synmced mac product, although I have 1and1.co.uk and my imac updatetes the mails in that account from mac mail.
    Yahoo etc is a 2 step deleting process but good to get your emails pushed when on the go.
    LJ
    http://www.facebook.com/The.Cowboy.Party

  • I have snow leopard.  Using iCloud, I an receive mail on my mac, but suddenly, I am no longer able to send email from the mac.  I can still send it from the icloud web site.  How do I regain the ability to send email from the mac?

    I have snow leopard.  Using iCloud, I can receive email on my mac, but, suddenly, I am no longer able to send email from the mac.  I can send it from iCloud online.  Any thoughts on how to regain the abilty to send email from my mac?  Thanks.

    Install ClamXav and run a scan with that. It should pick up any trojans.   
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101

  • I have two email accounts that are set up on the same iPad.  I cannot seem to see, read or send email from the second account

    I just set up a second email account on the same iPad but cannot seem to see, read or send email from the second account. 

    I'm using Windows 8 (not 8.1) and whatever the latest Thunderbird version is. They're both IMAP accounts. I was using Windows Live, but I couldn't get that to work, so I switched to TB. It works JUST fine for the one account, but not the other! They're identical except for the "handle". Both off my local ISP, set them up at the same time.

  • I am using Mail 5.3 with two separate gmail addresses. One is personal the other is business. When I send emails from the business address, any auto-replies I get COME TO THE PERSONAL INBOX. I imagine that this is a setting? Please help!

    I am using Mail 5.3 with two separate gmail addresses.
    One is personal the other is business.
    When I send emails from the BUSINESS address, any auto-replies/out of office notices I get come to my PERSONAL INBOX.
    I imagine that this is a setting? Please help!

    Edit the SMTP server list. Add a new one for the business account. Put the correct password and information for it. Give it a description so you will know which server is which. Mke sure the correct server is highlighted in the account selected and check the box to use only that server for that account. Do that for the other account also.

  • Is it possible to read , send emails from the database in oracle8.

    Hi,
    My present project needs me to send emails from the database through procedures. There is an oracle package UTL_HTTP in oracle8 which could be used to read emails from database. So kindly tell how to go about sending an email from the database. Is this feature available in Oracle8i.
    Thank you.

    Okay , Here's my Javascript wgich is in an onload process.
    Javascript variable addr_str displays the correct result.
    My hidden field is called P101_CHECKVAL.
    <html>
    <title>CodeAve.com(JavaScript: Display All URL Variables)</title>
    <body bgcolor="#FFFFFF">
    <script language="JavaScript">
    <!--
    // Create variable is_input to see if there is a ? in the url
    var is_input = document.URL.indexOf('P101_CHECKVAL:');
    // Check the position of the ? in the url
    if (is_input != -1)
    // Create variable from ? in the url to the end of the string
    addr_str = document.URL.substring(is_input+1, document.URL.length);
    // Loop through the url and write out values found
    // or a line break to seperate values by the &
    for (count = 0; count < addr_str.length; count++)
    if (addr_str.charAt(count) == "&")
    // Write a line break for each & found
    {document.write ("<br>");}
    else
    // Write the part of the url
    {document.write (addr_str.charAt(count));}
    // If there is no ? in the url state no values found
    else
    {document.write("No values detected");}
    -->
    </script>
    </body>
    </html>
    Everytime I put the HTML_get code into the javascript, it basically tells me I have an error on the page. So what exactly do I put that sets P101_CHECKVAL equal to the value of addr_str?

  • TS3899 How do I get my list of contacts from Gmail to my iPad2 so I can send email from the iPad?

    How do I get my list of contacts from Gmail to my iPad2 so I can send email from the iPad?

    Take a look at this help site that I found by using Google ...
    http://support.google.com/mobile/bin/answer.py?hl=en&answer=138740

  • I am switching accounts with my brother (long story why) but I need to remove my emails from the Mail application. I removed my Gmail account but when I try to remove my iCloud email it still keeps the emails. Does anyone know to remove a iCloud email?

    I am switching accounts with my brother (long story why) but I need to remove my emails from the Mail application. I removed my Gmail account but when I try to remove my iCloud email it still keeps the emails. Does anyone know to remove a iCloud email?

    Hi, how are you seeing these eMails if the account is removed?

  • Error when sending email from a web application that runs on GlassFish

    Hello all, I hope some can give me some hints on how to fix this problem.
    I have a web application built in Java that runs on GlassFish v3.
    The application uses a mail plugin that makes use of mail.jar
    Whenever I try to use the plugin to send an email out I get an error.
    The application is programmed to send emails from a gmail account, and I believe there is a problem with the SSL version that Googlemail is expecting.
    By the way, everything works fine if I run the web app on other servers like Jetty or Apache.
    The stacktrace I get from the log when the error occurs is as follows:
    INFO: 2009-05-08 19:48:57,500 [httpWorkerThread-8080-0] ERROR errors.GrailsExceptionResolver - org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465;
    nested exception is:
    java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl)
    org.codehaus.groovy.runtime.InvokerInvocationException: org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465;
    nested exception is:
    java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:431)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:337)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:218)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:250)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:218)
    at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:883)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:732)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:554)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:485)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:377)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:250)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:218)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:250)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:218)
    at org.jsecurity.web.servlet.JSecurityFilter.doFilterInternal(JSecurityFilter.java:382)
    at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:250)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:218)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:250)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:218)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:250)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:218)
    at org.apache.catalina.core.StandardWrapperValve.preInvoke(StandardWrapperValve.java:460)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:139)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:186)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:96)
    at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:142)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
    at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:242)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:180)
    at com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:633)
    at com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:570)
    at com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:827)
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:152)
    at com.sun.enterprise.v3.services.impl.GlassfishProtocolChain.executeProtocolFilter(GlassfishProtocolChain.java:71)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89)
    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67)
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:56)
    at com.sun.grizzly.util.WorkerThreadImpl.processTask(WorkerThreadImpl.java:325)
    at com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:184)
    Any help would be really appreciated... honestly I'm pretty stuck.
    Alex

    Hi Alex,
    Since I had a Gmail test servlet kicking around, I ran it on the latest V3 nightly build.
    On the first run, I encountered the following nested exceptions:
    javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465
    --> java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl)
        --> java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl)
            --> java.security.UnrecoverableKeyException: Password must not be nullThe UnrecoverableKeyException is a manifestation of [https://glassfish.dev.java.net/issues/show_bug.cgi?id=6938|https://glassfish.dev.java.net/issues/show_bug.cgi?id=6938]
    I worked around this by adding the following JVM config options to domain.xml
    <jvm-options>-Djavax.net.ssl.keyStorePassword=changeit</jvm-options>
    <jvm-options>-Djavax.net.ssl.trustStorePassword=changeit</jvm-options> (Note: the default master password is "changeit")
    These lines are placed in /domain/configs/config/java-config of domain.xml for the particular server config you're using. There's only one server config in the default domain.xml shipped with V3. Then restart the server.
    I retested the code on both port 465 and 587, with and without the above config changes. Without the change, they both fail the same way, and with the change, they both work. Let me know if this helps.
    -Peter

  • HT1430 Hello, email settings correct, can not send emails from the ipad,

    ****, I HAVE ENTERED ALL MY EMAIL SETTINGS CORECTLY INTO MY IPAD FROM MY EMAIL ACCOUNT ON MY PC AND I CANNOT SEND EMAILS FROM IPAD  , WHAT AM I DOING WRONG CAN YOU HELP PLEASE

    it could be one of many reasons, is it giving you a reason why it is not sending emails?
    I know you said everything is the same as your PC email settings, but I would double check, also the iPad will tend to default to IMAP, so if you are using POP3 for your email, you may need to change the settings on the mail server. For example Gmail default to POP3 and needs IMAP turning on.
    What email account are you using? Who is it with?

Maybe you are looking for