Doubts in mail sending in java
Hi,
I am currently using the java mail api to send mails. The program is run in Unix server. I just want to know if routing is possible. Like, currently I have a program that I am running in a unix server A to send mail through a host H. Is there a way in java, where in from server A instead of sending to the actual target through host H, I want to send to unix server B, which will receive this information and send it to target through host H.
Please guide me.
Thanks in advance.
JavaMail doesn't control this at all.
Internet email is a "store and forward" protocol. You send the message to a mail server.
It's the responsibility of that mail server to route the message to the ultimate mail server, or at
least get it closer. How the mail servers do that is not your concern, and not something you
can control.
You can see the results of this routing in the "Received" headers in a message.
Similar Messages
-
Automatic Mail Sending in Java/JSP/Servlets
Hi,
How to send mails with a specified format automatically after a stipulated no of days when the user does not access a file/page.
TIA1. In your web application, have a database that keeps track of when a user accesses a page.
2. Once a day, run a program that scans that database looking for cases when a user has not accessed a page for N days, or whatever your criterion is. Use JavaMail to send an e-mail message to each of those users.
If you have specific questions about any of these things, don't hesitate to ask them in the appropriate forum. -
Java Mail: send a SINGLE email to a distribution list
Is it possible to send a single email to a distribution list using Java Mail?
Please help with some code samples.
Right now, our mail program uses java mail api to send one email/person in the distribution list and runs in a for loop. Is it possible to have the distribution list in the to field and just send one single email to all persons in the list?
Thanks,
Jayashree.Yes, of course, assuming your mail server supports
distribution lists. Most mail servers do, but exactly
how you create and administer a mailing list varies
from server to server.
Once you've created the mailing list on the server,
just use the name of the list in the To field of the
message. -
How to invoke Outlook Express to send mail in a JAVA GUI
hi..
i want to send a mail thru a java GUI...but when i press submit button..it has to invoke MS Outlook express and send the mail via this.
pls reply soon..
bi..Hi,
When I execute the command like "Runtime.getRuntime().exec("cmd /c start mailto:[email protected]?subject=Test&body=Hello");" in my java program,There is no boby in my outlook window .could you give me some suggestion? Thank you very much!
source:
import java.io.IOException;
public class TestAutoSendEMail {
public static void main(String[] args) {
try {
Runtime.getRuntime().exec("cmd /c start mailto:[email protected]?subject=Test&body=Hello");
catch (IOException ex) {
System.out.println(ex.getMessage());
} -
How to send mail attachments using java mail
can any one help how to create mails attachments using java mail
you can do it like this:
Message msg = new MimeMessage(session);
String fileAttachment = "c:/test.txt";
Multipart mp = new MimeMultipart();
BodyPart bp = new MimeBodyPart();
FileDataSource fds = new FileDataSource(fileAttachment);
bp.setDataHandler(new DataHandler(fds));
bp.setFileName(fds.getName());
mp.addBodyPart(bp);
msg.setContent(mp);
... -
Mail Sender Adapter for Exchange 2007 IMAPS account
Hi everybody,
I have the following todo:
I configured a Mail Sender Adapter that is supposed to fetch mails from an IMAP account.
The mails contain text files with data to be processed by XI 3.0 SP 22.
The mail server is Exchange 2007 and requires IMAPS. IMAP is not enough. I read the notes
- 893590 - XI 3.0 Mail sender adapter with IMAP or POP with SSL problem
- 856599 - FAQ: XI 3.0 / PI 7.0 / PI 7.1 Mail Adapter
and configured the sender apapter as follows:
URL: imaps://<ip address>/owa
Authentication method: Plain
User: <domain>\<user>
Password: topsecret
Poll Interval: 5
The first challenge is to setup the adapter with SSL. To do so, I added the Exchange server's
root SSL certificate in the default truststore service-ssl via the KeyStorage service.
This is necessary, as far as I know, to successfully validate the Exchange server's trusted
certifacate which is being transfered to XI during SSL handshake.
Since the communication channel in RWB is in status error with following message:
mail client job stopped completly
exception caught during processing mail message; java.io.IOException: invalid IMAP status response; not finding * STATUS, but 001I NO owa doesn't exist.
mail client job scheduled,
I do not know how to setup SSL for IMAPS. I successfully tested a PING to the Exchange server.
Are there already experiences with Exchange 2007?
What I have to do to fetch mails from an Exchange 2007 IMAPS folder/account with a Mail Sender Adapter?
Kind regards,
AndreasHi,
It should be imap and not imaps.
You can try imap://xxx.xxx.de:993/Inbox
Make sure that port 993 is correct. If you have doubt, then you may try 143 which is default port instead of 993 in the above url.
regards,
ganesh. -
Mail sender adapter POP server not configured for URL access
Hi Experts,
I have a Mail --> PI --> R/3 scenario and I am configuring the Mail sender adapter for POP3. The issue is that the POP server is not configured to be accessed via a URL and hence the URL pop://hostname/ is causing the following error at runtime:
_1. When I use pop://Fully qualified host name/
_Error: exception caught during processing mail message; java.net.UnknownHostException
_2. When I use pop://IP address of host/
_Error: exception caught during processing mail message; java.net.SocketException: Connection timed out:could be due to invalid address
I am able to ping the POP3 server from the PI server using both the FQDN and IP address.
Can someone please help.
Thanks,
Shobhit
Edited by: Shobhit Swarup Mathur on Jul 14, 2009 9:29 AM
Edited by: Shobhit Swarup Mathur on Jul 14, 2009 9:29 AMHi Shobhit
Check with these notes:
804102
xi 3.0 mail adapter with pop3 user authentication problem
810238
XI 3.0 Mail Adapter for POP3 may not report some errors
also check mailserver security settings ...
Connection refused occures when XI cannot connect
in most cases so try checking it again , maybe some ports are not opend on the firewall
Thanks
Edited by: Abhishek Agrahari on Jul 14, 2009 11:44 AM -
Error in Mail Sender communicational channel
Hello!
We have an XI scenario, which should take emails from the mail server and transfer them to SAP. For this purpose the configuration channel has been configured with the following params:
Transport protocol: IMAP:
Message protocol: XIPAYLOAD
Configure user authentification: checked.
This channel stopped working about two weeks ago after a kernal patch (notes 1436917, 1441654, 1424397 and 1443925). The error is the following:
exception caught during processing mail message [44]java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
Application log gives only this information:
1.5 #16F1003D6202007C00003680001470F4000484907936C6A6#1271655950632#/Applications/ExchangeInfrastructure/AdapterFramework/SAPLibraries/SAPXDK##com.sap.aii.messaging.srt.xmb.XMBIMAPInitiatorServiceImpl.invoke()#J2EE_GUEST#0##bxp45ci_BXP_505494050##91fa4cf04b6e11dfae4616f1003d6202#XI Mail[Mail_Sender_MailFIBeleg/S36_SECURITAS/]_800280##0#0#Error#1#com.sap.aii.messaging.srt.xmb.XMBIMAPInitiatorServiceImpl#Plain###exception caught during processing mail message; java.io.IOException: unexpected list response;
I don't have an access to the Adminiatraion Viewr by now and can't activate any other traces. What is the most interesting - the error is occured only for definite sender, if the email is sent from another address, the processing works without errors.
Do you have any suppositions why could it be so and where should we search the reason of problem?
Your help will be very appreciated.Dear Bond,
Please follow the below useful doc:
http://wiki.sdn.sap.com/wiki/display/XI/CombiningthreedifferentaspectsofPIinoneshot
http://wiki.sdn.sap.com/wiki/display/XI/StepbyStepMailToFileScenario
Thanks,
Satya Kumar -
Error in mail sender channel : invalid sequence number
Hello all,
I'm having the following issue.
I'm using the mail adapter to get messages from a mail server, which are attached to the mail.
This interface is already productive, and is working fine most of the time.
Only frequently I get the following error, which can be found in the java log.
exception caught during processing mail message[630];
java.io.IOException: the specified message not found: -ERR invalid sequence
number
This error seems only to appear when there are a lot of mails to be fetched.
All the mail is read into PI and processed succesfully, only I also get a lot these errors.
Does anyone know what causes this error?
I also don't know where this sequence number is coming from, and what's the meaning of this.
Is it possible it's trying to read the same mail more then once?
The settings in the mail sender channel are:
- transport protocol : POP3
- message protocol : XIPAYLOAD
- Use mail package : enabled
- content encoding : none
- Keep attachments : enabled
- QOS : exactly once
- Set adapter specific message attibutes : enabled
The PI version is 7.01
Thanks a lot in advance for the replies on this question.
Kind regards,
Marco van IerselHi
Well we have used it with POP3 and it is working in the way as it should be.
This feature is recommended by sap when the number of emails to be read is large.
You can set this additional parameter to restrict the number of mails fetched by sender mail adapter in one polling interval.
Sometimes the mailbox configured for the sender mail adapter contains large number of unread mails, which exceeds the average expected number of mails in one polling interval. In such a case, processing of all the unread mails in the same polling interval by sender mail adapter degrades the system performance. To avoid this, set value of this parameter to the maximum number of mails to be fetched and processed in one polling interval. The remaining mails exceeding the limit would be processed in the next polling interval.
That's why I have asked you to give it a try. -
<satellite:form method="post" id="contact-form" enctype="multipart/form-data">
<input type="file" name="adjunto" />
</satellite:form>
FTValList ftListaFichero = new FTValList(1);
ftListaFichero.setValBLOB(ics.GetVar("adjunto_file"), ics.GetBin("adjunto"));
<mail:send
to="<%=to_emailaddress %>"
from="<%=from_emailaddress%>"
subject="Subject"
body="<%=body %>" >
<mail:attachment value='<%=ftListaFichero.getVal(ics.GetVar("adjunto_file"))%>'/>
</mail:send>
http://docs.oracle.com/cd/E29542_01/apirefs.1111/e39371/JSP/mail-attachment.html
http://docs.oracle.com/cd/E29542_01/apirefs.1111/e39371/JSP/mail-send.html
Regards,Simplest might well be to use javamail API instead of the two tags that Sites provides, e.g. see email - Sending mail attachment using Java - Stack Overflow for a full example.
Phil -
Xi mail sender adapter for outlook express configuration
hi,
can somone please tell me how to configure xi mail sender adapter for reading from inbox of outlook express?
i keep getting errors in communication channel monitor:
"exception caught during processing mail message; java.io.IOException: unexpected user response; read -ERR Command is not valid in this state."
Thanks
TomerHi,
use below link,finish the configuration of sender mail adapter,many documents available on the same in sdn,search your self
http://www.riyaz.net/blog/xipi-configuring-the-sender-mail-adapter/
Cheers,
Raj -
Mail Sender Adapter with IMAPS
Hi,
I had a Mail Sender Adapter running fine with imap. Our Email Server has changed now to secure protocol. Therefore I need to use the Mail Sender Adapter with IMAPS. If I use imaps://<mailserver>:993 in the channel configuration the Mail Adapter aborts with error "not initialized; mail agent null" and in the default trace it says "failed to initialize the channel: java.io.IOException: illegal protocol for XMBIMAPInitiator: imaps#". If I configure the Mail Adapter with <b>imap</b>://<mailserver>:993 the Mail Adapter starts and says "running", but it does not poll the postbox. In the security.log file there is a warning about untrusted certificates "com.sap.security.core.server.https.SecureConnectionFactory#Plain###Attempting to create outgoing ssl connection without trusted certificates#". I did already import the (CA) Certifcate of the mailserver with key storage service of J2EE Engine in the Trusted area and I configured the J2EE Engine for using SSL (the https access to the J2EE Engine works fine).
What is still missing in XI 3.0 (SP12)? I can access the postbox securely with e.g. Thunderbird using port 993.
Has anyone an idea or had already this issue?
Thanks for any help in advance.
PeterHi Sebastian ,
The Mail sender --IMAPS , did it solve your issue because i fcae the same kind of Error in Communication Channel :
exception caught during processing mail message; java.io.IOException: unable to create a socket
Mail sender CC:imaps://NZxxx.dknz.nzcorp.net:993/NZDKINVOICES
-Login Credentials is correct.
-Defualt XI Paramters are correct
-Mail Server is the right one
-Tried in command prompt , N:/telnet NZxxx.dznz.corp.net 143 , but i get response : Could not open connection to the host, on port 143 .Connection Failed
Could you kindly assist
Thanks,
Vara -
hi
Here is the code i am using for mail attachment without attachment it is working fine
package com.nihon.login;
import java.util.Properties;
import java.util.ResourceBundle;
import javax.activation.DataHandler;
import javax.activation.DataSource;
import javax.activation.FileDataSource;
import javax.mail.BodyPart;
import javax.mail.Message;
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.mail.util.ByteArrayDataSource;
public class Mail {
* @param args
private static String host = null;
private static String from = null;
private static String to = null;
private static String subject = null;
private static String content = null;
private static String filename = "D:\\Users
entry.pdf";
public static void send(String fromAddress,String toAddress,String subject, String mailContent) throws Exception{
send(fromAddress,toAddress,null,subject,mailContent);
public static void send(String fromAddress,String toAddress, String ccAddress,String subject, String mailContent) throws Exception {
ResourceBundle rb = ResourceBundle.getBundle("com.nihon.login.Application");
MailInfo mail = new MailInfo();
mail.setMailServer(rb.getString("nihon.mail.server"));
if(fromAddress!=null){
mail.setFromAddress(fromAddress);
}else{
mail.setFromAddress(rb.getString("nihon.mail.fromID"));
host = mail.getMailServer();
// Get system properties
Properties props = System.getProperties();
// Setup mail server
props.put("mail.smtp.host", host);
// Get session
Session session = Session.getDefaultInstance(props, null);
// Define message
MimeMessage message = new MimeMessage(session);
// Set the from address
message.setFrom(new InternetAddress(mail.getFromAddress()));
// Set the to address
if(toAddress!=null)
message.addRecipient(Message.RecipientType.TO, new InternetAddress(toAddress));
if(ccAddress!=null){
message.addRecipient(Message.RecipientType.CC, new InternetAddress(ccAddress));
// Set the subject
message.setSubject(subject);
// Set the content
message.setText(mailContent);
For attachment
BodyPart messageBodyPart = new MimeBodyPart();
Multipart multipart = new MimeMultipart();
multipart.addBodyPart(messageBodyPart);
messageBodyPart = new MimeBodyPart();
DataSource source = new FileDataSource(filename);
messageBodyPart.setDataHandler(new DataHandler(source));
messageBodyPart.setFileName(filename);
multipart.addBodyPart(messageBodyPart);
message.setContent(multipart);
// Send message
Transport.send(message);
// Method to instantiate once
public static Mail getInstance() {
if (instance == null) {
instance = new Mail();
return new Mail();
// Construtctor
protected Mail() {
private static Mail instance = null;
But now i add some code for attachment after that i got the exception in below
javax.mail.MessagingException: IOException while sending message;
nested exception is:
java.io.IOException: No content
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:625)
at javax.mail.Transport.send0(Transport.java:169)
at javax.mail.Transport.send(Transport.java:98)
at com.nihon.login.Mail.send(Mail.java:104)
at com.nihon.login.Mail.send(Mail.java:47)
at com.nihon.login.Mailsender.sendMail(Mailsender.java:47)
at com.nihon.login.Mailsender.attributeAdded(Mailsender.java:19)
at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1334)
at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1243)
at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:130)
at com.nihon.track.OnsitePlacement.doProcessRequest(OnsitePlacement.java:347)
at com.nihon.track.OnsitePlacement.doPost(OnsitePlacement.java:420)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Unknown Source)
How can i solve this problem.
Thanks in advance.......If the message is in an Exchange server, you can access it with JavaMail
and extract the attachment. See the JavaMail FAQ and the many sample
programs that come with JavaMail.
If the message is in Outlook's message store on your desktop machine,
it's harder. You need a JavaMail "message store provider" that understands
the message store format used by Outlook on your local disk. JavaMail
doesn't come with such a provider, but you might find one in the Third
Party Products list on the JavaMail web page. -
Picking mails from a particular sender using mail sender adapter
Hi Everyone,
I want to create a scenario in which i want to pick mails from a particular sender and send it to XI.
I don't want all the unread mails to be sent to XI but only those belonging from a particular sender.
How should i configure the mail sender adapter to achieve the same.
Thanks and Regards
Rahul NawaleHi,
there are two ways to do that:
not standard:
create a java proxy which will check your maibox for mails
from only one particular sender and then send messages
to the xi
more standard:
create a new accound and redirect your mails from a particular sender from the main mailbox to this new one
and poll from this new one only...
this way you'll be able to use atandard mail adapter
with no changes at all
Regards,
michal
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a> -
How to get Formatted Mail Content through Java Application
I am using a mail sending function in my applet code which is listed below:
Main content is fetched from a format tool bar in JSP Page and it is passed as parameter to applet and it is used inside the mail content.
Same content when passed and executed in a JSP page, the formatted content is not lost and it is included in mail content as what it is fetched from Format Tool Bar.
Format is lost when it is used inside the Java Application mail sending function.
The below code I have used to send mail:
package com;
import java.util.HashSet;
import java.util.Properties;
import java.util.Set;
import javax.mail.BodyPart;
import javax.mail.Message;
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;
class mailsendClass
public void sendmail(String from,String host,boolean debug,String msgText)
try
Set tomailsid = new HashSet();
Set ccmailsid = new HashSet();
//to mail ids
tomailsid.add("[email protected]" );
tomailsid.add("[email protected]" );
tomailsid.add("[email protected]" );
//cc mail ids
ccmailsid.add("[email protected]" );
ccmailsid.add("[email protected]" );
String mailarray[]= (String[])tomailsid.toArray(new String[tomailsid.size()]);
String ccmailID[]= (String[])ccmailsid.toArray(new String[ccmailsid.size()]);
Properties props = new Properties();
//props.put("mail.smtp.port","425");
props.setProperty("mail.smtp.host", host);
if (debug) props.setProperty("mail.debug", ""+debug);
Session session = Session.getInstance(props, null);
session.setDebug(debug);
String mailsubject = "Mail Subject";
// create a message
Message msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(from));
javax.mail.internet.InternetAddress[] toAddress=new javax.mail.internet.InternetAddress[mailarray.length];
for (int i=0;i<mailarray.length ;i++ )
toAddress=new javax.mail.internet.InternetAddress(mailarray[i]);
System.out.println ("id inside to address loop " + i + " is "+ mailarray[i]);
System.out.println ("toAddress " + i + " is "+ toAddress[i]);
msg.setRecipients(Message.RecipientType.TO, toAddress);
msg.setSubject(mailsubject);
try
javax.mail.internet.InternetAddress[] CCAddress=new javax.mail.internet.InternetAddress[ccmailID.length];
for (int i=0;i<ccmailID.length ;i++ )
CCAddress[i]=new javax.mail.internet.InternetAddress(ccmailID[i]);
System.out.println("CC Array is ===> " +CCAddress[i] );//
msg.setRecipients(Message.RecipientType.CC,CCAddress);
catch(Exception ss)
System.out.println("CC mail Exception is ====>"+ ss);
msg.setSentDate(new java.util.Date());
// Multipart multipart = new MimeMultipart("relative");
Multipart multipart = new MimeMultipart("alternative");
BodyPart messageBodyPart = new MimeBodyPart();
messageBodyPart.setContent(msgText, "text/html");
// messageBodyPart.setContent(msgText, "text/plain");
multipart.addBodyPart(messageBodyPart);
msg.setContent(multipart);
Transport.send( msg );
catch (Exception e)
System.out.println("The Exception is ------>"+e);
public class SendMail {
public static void main(String[] args)
System.out.println("before Mail Send ");
mailsendClass mail = new mailsendClass();
String from="[email protected]";
String host="172.16.2.6";
String msgText="<p><strong>Index</strong><br />I have posted the following PDFs (Second Pages) as mentioned to start producing the Index:<br /> Engage<br /> Chapters 16<br /><a title='ftp:///Index' href='ftp://index/'>ftp:///Index</a><strong><br />XML Coding - Files with errors</strong><br /> Engage<br /> Chapters 16<br /><a title='ftp:///XML_Coding_Need%20Fixing' href='ftp://xml_coding_need%20fixing/'>ftp:///XML_Coding_Need%20Fixing</a></p>";
mail.sendmail(from,host,true,msgText);
System.out.println("after Mail Send ");
Content placed in format tool bar is as follows:
Index
I have posted the following PDFs (Second Pages) as mentioned to start producing the Index:
Engage
Chapters 16
ftp:///Index
XML Coding - Files with errors
Engage
Chapters 16
ftp:///XML_Coding_Need%20Fixing
Content fetched from format tool bar inside JSP page is as follows:
<p><strong>Index</strong>
I have posted the following PDFs (Second Pages) as mentioned to start producing the Index:
• Engage
• Chapters 1–6
<a title="ftp:///Index" href="ftp://index/">ftp:///Index</a><strong>
XML Coding - Files with errors</strong>
• Engage
• Chapters 1–6
<a title="ftp:///XML_Coding_Need%20Fixing" href="ftp://xml_coding_need%20fixing/">ftp:///XML_Coding_Need%20Fixing</a></p>
Fetched Content inside Java Application through parameter and it will use as input for mail content is as follows:
<p><strong>Index</strong>
I have posted the following PDFs (Second Pages) as mentioned to start producing the Index:
Engage
Chapters 16
<a title="ftp:///Index" href="ftp://index/">ftp:///Index</a><strong>
XML Coding - Files with errors</strong>
Engage
Chapters 16
<a title="ftp:///XML_Coding_Need%20Fixing" href="ftp://xml_coding_need%20fixing/">ftp:///XML_Coding_Need%20Fixing</a></p>
Actual mail received after Java Application execution is as follows:
Index
I have posted the following PDFs (Second Pages) as mentioned to start producing the Index:
? Engage
? Chapters 1?6
ftp:///Index
XML Coding - Files with errors
? Engage
? Chapters 1?6
ftp:///XML_Coding_Need%20Fixing
Unicode characters in the mail content are replaced by ?.
In the function listed above I have used the MIME Setting as
Multipart multipart = new MimeMultipart("alternative");
I have tried by using relative MIME format also as
Multipart multipart = new MimeMultipart("relative");
But I am not getting the actual format passed as input to the Java Application in the mail content.
Can anybody let us know how to overcome this problem?
Thanks in advance.You need to really understand how the different multiparts work instead of just guessing.
But for your application, you don't need a multipart at all. Just use msg.setText(msgText, null, "html");
Although that doesn't explain your problem, it will simplify your program.
How are you determining that the mail received doesn't have the formatting? Are you viewing it in a
mail reader (e.g., Outlook)? Or are you fetching it with JavaMail?
Are you using an Exchange server? Exchange will often reformat your message to what it thinks you meant.
Maybe you are looking for
-
Flash player 10.1 still not working (more information).
A few months back, I made a thread concerning my situation of specific flash content not being played. I have returned, with hopes that my trials and tribulations may provide more insight into my problem. Basics Windows XP 32bit (v2002) - Media Cente
-
Passing result list from Contact search to Target group
Hi, I have to pass the result list of Contact serch(BP_CONT_SEARCH) to Target group creation component(SEGED_TG). Can you give me the steps that I need to follow. Note: Here the contact structure is different in each component. Thanks.
-
Mac equivalent to Get Midi?
Hi, I currently use a programme on the PC to search the web for MIDI files. It's great and one of the only reasons I still use a PC: http://www.getmidi.co.uk/ Is there a Mac equivalent that will allow me to search and preview MIDI files on the web. I
-
Generate & using Javascript in custom Tag
Hi everyone, I'm developing a custom tag to create a treeview from a TreeModel. I've got a script found on the web which uses a few javascripts file. My question is : How do i have to use my javascripts file ? Do i have to just import the javascipt f
-
Hello Team i was wondering what is happening to my Debit Card it's been working all along
I have a Debit Card that i have been using to purchase apps and OSX for close to two years now it has just stopped today giving and error saying the card or payment is declined. i don't know whether it could be the automatically movement from Botswan