Unable to send mail with different fonts and colors

Hi All,
here is the explanation for my problem:
I am sending mail using javamail. when i send the text with different font and color its not received in the same way. it is simply sending as plain text.
Please help me on this issue.
Thanks
NG

Hello,
I am trying to develop an email application. It consists on sending email from [email protected] to [email protected]
How can I do this in java ?
I am using this software but it works only with gmail !!
         * Send Email to the webmaster
         String  d_email = "[email protected]",
                 d_host = "smtp.gmail.com",
                 d_port  = "465",
                 m_to = "[email protected]",
                 m_subject = "Email from user";
         Properties props = new Properties();
         props.put("mail.smtp.user", d_email);
         props.put("mail.smtp.host", d_host);
         props.put("mail.smtp.port", d_port);
         props.put("mail.smtp.starttls.enable","true");
         props.put("mail.smtp.auth", "true");
         props.put("mail.smtp.debug", "true");
         props.put("mail.smtp.socketFactory.port", d_port);
         props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
         props.put("mail.smtp.socketFactory.fallback", "false");
         SecurityManager security = System.getSecurityManager();
         try
            Authenticator auth = new SMTPAuthenticator();
            Session session = Session.getInstance(props, auth);
            //session.setDebug(true);
            MimeMessage msg = new MimeMessage(session);
            msg.setText("This is a message from: "+UserEmail+"\n "+UserMessage);
            msg.setSubject(m_subject);
            msg.setFrom(new InternetAddress(d_email));
            msg.setSentDate(new Date());
            msg.addRecipient(Message.RecipientType.TO, new InternetAddress(m_to));
            Transport.send(msg);
         catch (Exception ex)
            ex.printStackTrace();
            out.println("Messaging ERROR: " + ex);
            out.println(stack2string(ex));
                if(ex.getMessage().compareTo("")!=0)
                    check = "Message NOT SENT " + ex.getMessage();
    private class SMTPAuthenticator extends javax.mail.Authenticator
        public PasswordAuthentication getPasswordAuthentication()
            return
new PasswordAuthentication("[email protected]", "pwd");
    }please advice

Similar Messages

  • Can I show different fonts and colors text on 1 multi-line text fields?

    I want to format different messages on 1 mutli-line field with different fonts and colors for the heading lines. Can I do that in Forms 6i ?

    You must use in trigger Post-query the sentence:
    Example:
    DECLARE
    cur_itm VARCHAR2(80);
    cur_block VARCHAR2(80) := :System.Cursor_Block;
    BEGIN
    cur_itm := Get_Block_Property( cur_block, FIRST_ITEM );
    WHILE ( cur_itm IS NOT NULL ) LOOP
    cur_itm := cur_block||'.'||cur_itm;
    Set_Item_Instance_Property( cur_itm, CURRENT_RECORD,
    VISUAL_ATTRIBUTE,'My_Favorite_Named_Attribute');
    cur_itm := Get_Item_Property( cur_itm, NEXTITEM );
    END LOOP;
    END;

  • Office365 macbook air while copy paste and change font to tahoma forarded message remain with different fonts and size not accepting change

    office365 macbook air while copy paste and change font to tahoma forarded message remain with different fonts and size not accepting change
    mac yosemite
    office365

    Also here's the log before it happened. As you can see there is no activity from 9:48 to 10:00 am when the sound occurred.
    23/02/2014 9:48:12.792 am ntpd[52]: FREQ state ignoring -0.145411 s
    23/02/2014 9:48:15.258 am WindowServer[96]: _CGXHWCaptureWindowList: No capable active display found.
    23/02/2014 9:48:20.000 am kernel[0]: AppleCamIn::systemWakeCall - messageType = 0xE0000280
    23/02/2014 9:48:20.000 am kernel[0]: ARPT: 61.319378: AirPort_Brcm43xx::powerChange: System Sleep
    23/02/2014 9:48:20.000 am kernel[0]: ARPT: 61.319390: wl0: powerChange: *** BONJOUR/MDNS OFFLOADS ARE NOT RUNNING.
    23/02/2014 9:48:20.000 am kernel[0]: AppleCamIn::systemWakeCall - messageType = 0xE0000340
    23/02/2014 10:00:04.000 am bootlog[0]: BOOT_TIME 1393167604 0
    23/02/2014 10:00:06.000 am syslogd[17]: Configuration Notice:
    ASL Module "com.apple.appstore" claims selected messages.
    Those messages may not appear in standard system log files or in the ASL database.
    23/02/2014 10:00:06.000 am syslogd[17]: Configuration Notice:
    ASL Module "com.apple.authd" sharing output destination "/var/log/system.log" with ASL Module "com.apple.asl".
    Output parameters from ASL Module "com.apple.asl" override any specified in ASL Module "com.apple.authd".

  • Stop sending messages with different fonts!

    Hello,
    I need some help. I started using Apple Mail recently and I like it alright. My main issue is that when I cut and paste from my browser or from anywhere else really, the program is preserving the font though I can't see that it is. When I get a response from somebody that I sent a message to, I see 2 or 3 different fonts and/or sizes. They only way I have figured out how to deal with this is an ugly fix. I have to open the font panel with every email and manually choose the right font and font size. Annoying! Any fix available? It look really unprofessional!
    Thanks,
    Jared

    When you paste the text, instead of the old cmd+v, go to Edit menu and use Paste and Match Style, this should ignore the original font/color and use the current one in your mail. Or if you want to just send plain text email, you can go to Format > make plain text, this will strip all formatting even if you pasted in.

  • I would like to print links as regular text i.e. not underlined or in a different font and color.

    I have created a page with my resumé, using Dreamweaver CS4 on my iMac (running OS X 10.6.6).  You can see the page here: http://www.peterforkes.com/Resume.html
    It looks great when it is on the screen, but when I print it I would like the links to not be underlined and also to be displayed in the same font (and color) of the text surrounding it (a link is largely useless on a piece of paper, if it it not showing the URL).
    So, I created a stylesheet called "print.css" and have this in it:
    a:link {
    text-decoration: none;
    In my html document (Resume.html)  I have this code, at the top:
    <link href="_css/Resume.css" rel="stylesheet" type="text/css" media="screen" />
    <link href="_css/Print.css" rel="stylesheet" type="text/css" media="print" />
    Now, things such as the graphics in my document do not print out (this is how I want it) but links seesm to be doing unexpected things for me.  As I mentioned, when I print the page I would like them to:
    a) not print with an underline (which I would expect the code snippet shown above to do).
    b) I would like the link color to be the same as the surrounding text (I have links in several places, such as in <h2>, <h3> and <p>).
    c) I would like the link to have the same font and text size as the surrounding text.
    Any help is always appreciated.
    Peter A. Forkes

    You've solved it for a:link but you may print the page with the <a> tag in link or visited state so you need to cover both.
    In http://www.peterforkes.com/_css/Print.css
    change
    a:link {
    text-decoration: none;
    to
    a:link, a:visited {
    color: #333;
    text-decoration: none;

  • Office 365 unable to send mail with automatic address

    hi,
    I am unable to send email from outlook 2013 (configured to office 365 exchange) it appears a message as "sorry something went wrong. you may want to try again"
    I have configured a old pst file along with same outlook.. 
    it can send easly with typing manually email address .
    please provide me the solution..
    regards
    [email protected]

    Hi,
    Please first try to log into your OWA and check if you can send email using autocomplete address. If OWA works fine, it means the problem is specific to Outlook client.
    If this issue only happen with single or several addresses, we can just delete the address by clicking 'X' after the address:
    If this issue happen to all autocomplete addresses, there may be a problem with your autocomplete cache. We can rename the cache file to resolve the problem. You can refer to the following KB article for detailed steps:
    http://support.microsoft.com/kb/2682333/en-us
    Hope this helps.
    Regards,
    Steve Fan
    TechNet Community Support

  • Unable to send mail with attachment

    Running 10.5.5 and Mail 3.5. Am able to send and receive mail, but if I attach a file, mail sends up to a point, rate goes to 0 and mail times out after a few minutes. Am able to receive mail with attachments. Sending is only problem. Have discussed with comcast and it says no problem with their system, must be Apple problem. This problem started in October and I wonder if it is related to latest update (10.5.5).

    Ernie,
    Thanks for the comment. Comcast service did tell me that it is using Port 25 to try to control spam, and it might be the problem. However, when I try to change the smtp server, I run into a problem. In the Account Information window the Outgoing Mail Server was set to "none". I selected "Edit Server List" and entered the following: Description; Comcast Mail; Server Name: smtp.comcast.net and then selected "Advanced". The port was set to "Use default ports (25, 465, 587". I selected "Use custom port" and entered 587 and my user name and password. I then clicked OK and returned to the Account Information window. Under Outgoing Mail Server (SMTP), "Comcast Mail (Offline" was showing. The only other option available was "None". smtp.comcast.net was never offered. In addition, when I went back to "Edit server list" and "Advanced", "Use custom port was selected", but the port had been changed to 25. I seem to be locked into port 25. What's going on? Perhaps I should try to reload Mail, although I guess I would lose my several thousand emails.
    The really bad thing is that this only started happening a few weeks ago. Before then everything worked very well. I was afraid that when I started sending a group of 100 emails as fast as I could enter them, Comcast noted the rate and decided to put a freeze on my access. The support staff, however, claims that there is no restriction on my account.
    I'm perplexed and don't know what to do. I cannot live without email and I am currently tied to Comcast because I also use its Cable TV.
    Phil

  • Sending mail with different address with iPhone with account gmail

    Hi there! I'm a new customer of the big and amazing world Apple! I'm very excited but as you can imagine I have some problem to use my new iPhone. I have an e-mail address [email protected] and I have associated in gmail this addres with [email protected] I have put some parameters that allow me to send e-mail from gmail on the pc as if I send it from [email protected] Can I do the same when I send the mails from my iPhone? How can I configure this? For me this is a very big problem. I hope to solve. Thanks a lot! Have a good day! Max

    Read last paragraph:
    http://readwrite.com/2012/03/20/how_to_be_a_happy_gmail_user_on_iphone_or_ipad#a wesm=~oc85GgWROJ7MSp

  • TS3276 I'M unable to send mail with yahoo and gmail accounts. any clues why? any help?

    Need help with MacPro mail and sending email currently not functioning.

    Troubleshooting sending and receiving email messages
    Troubleshooting sending email messages

  • Ipod touch is unable to send mails with attachements., After I've updated iOS5 my ipod touch is unable to send mails with attachements.

    I've updated my ipod touch to iOS5 and after that I can't send any email with attachement even with the small one (40kb). What can I do with that?
    thanks,

    Does the iOS device connect to other networks? If yes that tends to indicate a problem with your network.
    Does the iOS device see the network?
    Any error messages?
    Do other devices now connect?
    Did the iOS device connect before?
    Try the following to rule out a software problem:                
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Power off and then back on your router
    .- Reset network settings: Settings>General>Reset>Reset Network Settings
    - iOS: Troubleshooting Wi-Fi networks and connections
    - Wi-Fi: Unable to connect to an 802.11n Wi-Fi network      
    - iOS: Recommended settings for Wi-Fi routers and access points
    - Restore from backup. See:
    iOS: How to back up
    - Restore to factory settings/new iOS device.
    If still problem and it does not connect to any networks make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar

  • How do I send emails in different fonts and letter sizes using Thunderbird?

    I can change the print size when composing emails but the print in the actual email when sent remains the same.
    I am using the latest release with Windows 8.1 64 bit.

    I think you misunderstand.
    In Mail.app's Window menu is an option 'Connection Doctor' (I don't know how these translate into non-English systems if you're using one).
    This will test the connection to all configured mail servers and report any problems.

  • Can't send mail with powerbook G4, mail.app, mac OS 10.5.8 and verizon smtp server.

    We just made the switch to Verizon.
    Setting up Mail.app with my relatively new MacBook Pro (and OS 10.8.4) was very smooth.
    Not so with my wife's old PowerBook G4 running 10.5.8, which she inherited from my daughter.
    It seems to set up fine, using the same settings for the servers as on the MBP (it has to be done manually), but it is unable to send mail (via the verizon smtp server). The Connection Doctor thing does not have any trouble finding the servers and connecting.
    I get the "The sender address [email protected] was rejected by the server smtp.verizon.net." message.
    These settings work when sending email from this verizon account from her iphone, or from my MBP.
    I successfully set up my .me email account on the G4 and that was able to send mail.
    Couldn't find anything online to shed light on this. Any help would be appreciated. Thanks

    Your asking peers here.
    You didn't say which settings you were trying to use.   Lots of people are posting about switching over to the latest EMAIL settings which include pop.verizon.net and smtp.verizon.net as the servers.  However it has invariably been a  mistake they are making or a special requirement of there DEVICE such as a shutdown and restart.
    You should take a look at http://verizon.com/emailsettings .  There are both the manual settings and some automatic trouble shooters that may be able to setup your device.

  • Sending mail with attachment fails on MAC Mail and WRP400.

    Sending mail with attachment fails on MAC Mail and WRP400.
    We have hundreds of WRP400 connected with Mac (Machintosh) computers. No special configurations are applied (no virtual server or DMZ). Web navigation, P2P programs and sending mail without attachment work right.
    The problem is the impossibility to send mails with medium or big size files attachment from MAC Mail.
    If we use Windows PCs or a different linksys routers (eg. WRT54G) the problem not happens.
    We have upgraded WRP400 firmware version from 1.00.06 to 2.00.05 but the result is the same. Sending mail with attachment using Mac fails.
    We tried to configure WRP400 with DMZ to a particular MAC. We tried to configure Virtual server on tcp 25 port of a MAC. The result is always the same.
    This is a WRP400 bug? Windows PCs work right. MAC and MAC mail works right with other linksys router.
    We need help. Thanks.

    The problem was fixed since beta firmware 2.00.11.
    I think that this issue was caused from a bug that decrease upload bitrate of WRP400 after some days of activity.
    See more details on Cisco forum under title "WRP400 stops responding after browsing certain websites".
    Thanks.

  • Unable to send mail- mail remains in outbox and I receive error message

    Ok, I have used Mail for years. All of a sudden I am unable to send mail. The mail goes to the outbox and then I receive the following error message.
    This message could not be delivered and will remain in your Outbox until it can be delivered.
    The server "smtp.mac.com" refused to allow a connection on port 25.
    I can connect to webmail of course and send mail that way.
    I receive mail perfectly.
    Not sure what to do...??
    Thank you for any help with this.

    Read the following article, which applies to all versions of Mac OS X (not just Mac OS X 10.4.2 and earlier as the article states) and can be useful for other mail accounts as well (not just .Mac):
    .Mac: Server timeout alert message when sending email

  • Mail returned in different font and size

    Hello,
    Sometimes my mails are returned in a different font and size (usually Times 12px) from the default I have set (Arial).
    I know this is a "common" problem but don't know the cause?
    Thanks

    You don't really have control over what font and size is seen by recipients of your emails, and even less over what their mail system does to fonts and sizes when it composes a return.
    The important thing to remember is that Mail > Preferences does not send any font info to the recipient. To do that you must set the font for each message separately in the New Message pane. If the recipient also has html mail enabled, then they will most likely see the font and size you have chosen.

Maybe you are looking for

  • Can't get router to connect to internet - printer

    This is not strictly an airport extreme question but I've got a major problem with my mac intranet set-up and hopefully someone can assist: Until 6pm here in Belgium today my Cable internet system was working fine (the past 2 years!). Suddenly no int

  • Problem in Planning Adapter in HAL

    <p>Hi</p><p>i have the following problem in HAL</p><p>"When i drag the planning adapter on to flow diagram andgive the server address.</p><p>it gave me an error <b>" HspBeanFactory"</b> andclosed off.</p><p>did anyone faced similar problem.</p><p> </

  • My USB Apple Aluminum Keyboard is not responding during Bootcamp Install!

    I am going crazy, I have had the worst experience with this Bootcamp install which is supposed to be so easy, resulting in Apple replacing my MAC pro, and I still can't get it to work on the new machine. My first problem was using a Windows XP Pro di

  • FCP crashing on log and transfer

    I have been experiencing this problem for quite some time and sort of got used to it. However I thought I'd throw it at the FCP experts and see if they have an answer. I shoot on AVCHD virtually every time I go to "Log and transfer" and select any fi

  • GR-Accounting document Enhancement

    All SAP experts, Can we do any enhancement in the accounting documents created after GR posting? We need posting to particular GL during Intercompany replenishment. Like Vendor is supplying plant XYZ and site ABC (where Goods receipts is carried out)