How to Reply to a Mail Using Javamail?

Hi Friends,
My Requirement is to reply to a email came froom sender mail.
and i want to send a reply email to my sender using JavaMail program.
I was sucessful in sending mails with attachments and i can retrive
plain mails i mean text mails,with attachments and all and all.
and also i have create an interface that will send mails
with attachments to the Recipients.
If any body knows the solution for this post me,
if possible post the code snipnet.
Thanks
Regrads
Nagaraju .g

And if it does turn out that there's a proxy server blocking access to your target SMTP server, the best way to deal with that is to discuss the issue with the person responsible for your network configuration.

Similar Messages

  • How to bypass proxy when trying to send a mail using javamail smtp

    Hi,
    I am trying to make a servlet send a mail using javamail smtp protocol on port 25 but i m not able to send getting an exception, i suspect proxy is blocking, so any idea anyone how bypass a proxy.

    And if it does turn out that there's a proxy server blocking access to your target SMTP server, the best way to deal with that is to discuss the issue with the person responsible for your network configuration.

  • Getting exceptions while sending mail using javamail api

    Hi to all
    I am developing an application of sending a mail using JavaMail api. My program is below:
    quote:
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.*;
    public class sms
    public static void main(String args[])
    try
    String strstrsmtserver="smtp.bol.net.in";
    String strto="[email protected]";
    String strfrom="[email protected]";
    String strsubject="Hello";
    String bodytext="This is my first java mail program";
    sms s=new sms();
    s.send(strstrsmtserver,strto,strfrom,strsubject,bodytext);
    catch(Exception e)
    System.out.println("usage:java sms"+"strstrsmtpserver tosddress fromaddress subjecttext bodyText");
    System.exit(0);
    public void send(String strsmtpserver,String strto,String strfrom ,String strsubject,String bodytext)
    try
    java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
    Properties p=new Properties(System.getProperties());
    if(strsmtpserver!=null)
    p.put("mail.transport.protocol","smtp");
    p.put("mail.smtp.host","[email protected]");
    p.put("mail.smtp.port","25");
    Session session=Session.getDefaultInstance(p);
    Message msg=new MimeMessage(session);
    Transport trans = session.getTransport("smtp");
    trans.connect("smtp.bol.net.in","[email protected]","1234563757");
    msg.setFrom(new InternetAddress(strfrom));
    msg.setRecipients(Message.RecipientType.TO,InternetAddress.parse(strto,false));
    msg.setSubject(strsubject);
    msg.setText(bodytext);
    msg.setHeader("X-Mailer","mtnlmail");
    msg.setSentDate(new Date());
    Transport.send(msg);
    System.out.println("Message sent OK.");
    catch(Exception ex)
    System.out.println("here is error");
    ex.printStackTrace();
    It compiles fine but showing exceptions at run time.Please help me to remove these exceptions.I am new to this JavaMail and it is my first program of javamail.Please also tell me how to use smtp server.I am using MTNL 's internet connection having smtp.bol.net.in server.
    exceptions are:
    Here is exception
    quote:
    Javax.mail.MessagingException:Could not connect to SMTP host : smtp.bol.net.in, port :25;
    Nested exception is :
    Java.net.ConnectException:Connection refused: connect
    At com.sun.mail.smtp.SMTPTransport.openServer<SMTPTransport.java:1227>
    At com.sun.mail.smtp.SMTPTransport.protocolConnect<SMTPTransport.java:322>
    At javax.mail.Service .connect(Service.java:236>
    At javax.mail.Service.connect<Service.java:137>
    At sms.send<sms.java:77>
    At sms.main<sms.java:24>

    Did you find the JavaMail FAQ?
    You should talk to your ISP to get the details for connecting to your server.
    In this case I suspect your server wants you to make the connection on the
    secure port. The FAQ has examples of how to do this for GMail and Yahoo
    mail, which work similarly. By changing the host name, these same examples
    will likely work for you.

  • Retriving unread mails using JavaMail api...

    Hi everyone, I am developing a swing GUI application using Java Netbeans and I want to develop a mail client which retrieves mails using Javamail api. Can anyone suggest me how I can implement the code to retrive the same.

    Did you bother reading anything before posting that question?

  • How to send HTML Format Mail using Java Mail in oracle 9i Forms

    Dear All
    could you please tell me how to send HTML Format Mail using Java Mail in oracle 9i Forms and how to implement the java mail ?
    if it is possible, could you please send me the sample code? please very urgent
    Thanks
    P.Sivaraman

    Hello,
    <p>Here is a Form sample.</p>
    Francois

  • How to setup SMTP server  in PC so as to send mails using JavaMail

    Hi,
    From forums i got it cleared that we can use JavaMail to send emails. I also got two sample codes about getting it done. But in the code its asks address of the host of SMTP server. I dont have any SMTP server. But i am writing a Library Application in which an email must be sent to users automatically when thier books are in overdue.
    Where can i get SMTP server to be installed on my PC so that i can use it send mails through Javamail API.
    Thanks

    Isnt there any way setup SMTP server on own pc?? I just want to send mails in my local area network.

  • Delivery Receipt After Sending Mail Using JavaMail ?

    Hi Friends,
    I have written an application using JavaMail which would be used to send mail
    using my organisation's SMTP Server.I would like to include the following functionality in it.Just as
    Microsoft's Outlook has an option to get Delivery Receipt of the mail and Read Receipt of the mail sent
    (Provided the email Client supports it) i would like to have a similar option in my application to.I would like to of how i can do it using JavaMail.I heard that basically we need to set some SMTP properties which the Mail Transfer Agent would recognize and send us the Delivery and Read Receipts.But,i am not sure of what those properties.Can anyone help me regarding this ?

    You might look into creating a custom header that provides a return reciept to the email address you specify. I'm not 100% sure that all mail servers support this but you might want to look into it as a solution.
    -Dave

  • Send THAI mail using JavaMail to Lotus Notes (URGENT)

    Hi all
    I experienced the problem when I try to use Javamail to send mail that contains THAI text to Lotus Notes . When I read my mail in Lotus Note,I cannot read it !! . What should I do ?
    Please suggest .
    Regards
    Chairat Tiajanpan
    E-Mail : [email protected]

    � hello!
    Do you know how can I do it? I am desesperated. Please help me.
    I want to send a mail to lotus notes using a Java class.
    What i need to install in my computer for running the class??
    Sorry for my english. I am spanish and i speak english very bad.
    Thanks!!

  • Problem replying in yahoo mail using iPod touch

    Hi,
    I am not able to to reply to emails using yahoo mail configured in ipod touch, I have this message : Cannot Send Mail The connection to the outgoing server "(null)" failed.
    But I'm able to send mails when not replying. What can I do to solve this problem?
    Thanks
    Pat

    I had the same problem with Yahoo! Mail but even worse I found that I simply could not send any mail at all. The problem only arose this week after installing the new (1.1.4) software upgrade.
    I had originally set up Yahoo! Mail using the option given on the Mail screen and it worked perfectly until the upgrade, which may just have been coincidental, I suppose. But I was then unable to send any mail at all. I deleted the e-mail account and then reapplied it but not by opting for the Yahoo! option on Mail and instead set it up as an 'Other' POP account, being sure to deactivate SSL and instead go for Password verification. From what I gather this is just how you would set up a Yahoo! Mail account for MacMail and this basically applies the advice that BT gives for Yahoo! Mail users with a Mac.
    It then worked fine, but I lost the really cool real-time sync with Yahoo! Mail which I had had previously.
    I have since managed to get Yahoo! Mail working again properly by simply trying and trying and trying to reapply the account as a true Yahoo! Mail account on the Mail icon and eventually it gave in to my dogged persistence.
    Good luck.

  • How to update the sent mail using SO_NEW_DOCUMENT_ATT_SEND_API1

    I have a requirement to update/ append the sent mail like a trail.Since i am sending mails using SO_NEW_DOCUMENT_ATT_SEND_API1, how can i update new contents to sent mails using this RFC???Please help me.

    you may have to store content of each time mail send then only, you can send with history.

  • How to setup and send mails using utl_mail on Oracle E-Biz R12

    Dear All
    There is a new requirement from client to setup and send mails using utl_mail utility on Oracle EBS R12.1.1
    What is utl_mail utility ? what is the difference between Workflow Notification Mailer and this utility/tool?
    What are etiquette's to pursue mail functionality in apps / db?
    - Chetan

    What is utl_mail utility
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_mail.htm
    How to Use the UTL_MAIL Package [ID 269375.1]
    FAQ and Known Issues While Using UTL_SMTP and UTL_MAIL [ID 730746.1]
    Master Note For PL/SQL UTL_SMTP and UTL_MAIL Packages [ID 1137673.1]
    Workflow Notification Mailer:
    you can send email using workflow notification email procedures,These ar built into the system and only need some minor configuration. check Workflow Administrator's Guide, Chapter 2, Section: Setting Up Notification Mailers for more detail.

  • Hello, I have installed a new Laserjet Pro M1217nfl using Wi-Fi. My laptop prints everything e-mails, Word documents etc. My iPad 3 (latest issue) only prints documents using Wi-Fi so has clearly recognised the printer. How can I prin e-mails using iPad 3

    Hello, I have installed a new Laserjet Pro M1217nfl using Wi-Fi. My laptop prints everything e-mails, Word documents etc. My iPad 3 (latest issue) only prints documents using Wi-Fi so has clearly recognised the printer. How can I print e-mails? Thanks.

    In the email you want to print, on the top right there is an arrow. Click that and an option should appear that says print. That should work. Have you already tried that?

  • How do I send E-Mail using Servlet or JSP?

    Hi friends,
    Anybody can you please tell me how do I send an email in Servlet or JSP?
    Do I need any special configuration to check in my server space?
    I am puzzled because after surfing on net, I found that some people sending email with Javamail and Activation API
    and some people sending email using import="sun.net.smtp.SmtpClient";Please give me some simple direction or any working code if possible.
    Thanking u,
    ---Sujoy

    What you need is a working SMTP account to be able to send email, that is accessible from the server. If you have that, simply use JavaMail.

  • How do i send e-mail using i pad air

    How do I send an e-mail using i pad air?

    You have to setup the Mail App with the correct parameters for your email provider.
    See Settings > Mail, Contacts, Calendars > Add Account.

  • How do I send e-mail using gmail?

    How do I send an e-mail using gmail?

    Via your GMail account that you setup on your iPad.
    Or using webmail with a browser.

Maybe you are looking for

  • Performance problems with Integrated security and ODP

    Hi While testing performance for opening a data base connection, I notice there is a huge performace issue when using externally identified users and ODP with Oracle client 11.1.0.6 and .Net 3.5. The test is running 30 times slower with an externally

  • To get current Fiscal Week

    Hello Guru's , I have a infoobject (Fiscal Week) which is developed in the back end. In report i would like to get the "Fiscal Week that justed ended" based on the "Fiscal Week" infoobject. Example: Fiscal Week 1,2,3,4,5,6....53 is stored in the cube

  • Creating layouts with text

    Is there a way of adding text to a document so it is contained in a text box, like a picture holder in an album layout?  I often create posters and fliers and it would be much easier if I could do rather than having to wrap text lines myself.

  • Saving images in Safari

    Is it possible to save an image in iPhone Safari to the iPhone Photo app.

  • Call manager and IP phones

    after the basement remodel i will have a server and computer repair area for my testing. I have a call manager server and a couple of ip phones and would like to setup a phone at each of my families houses. what would i need and how would i set it up