Javax.mail emails not sent
Hi,
We are sending emails through the javax.mail class in our application,
basically
it works fine, however I was wondering how I could do one of the two:
1. validate an email address to be correct (existing, not using the java
classes for rfc validation, but actualy pinging it).
2. receive a notification about the undeliverable email when it happens (if
it goes back to weblogic at all, I think I saw a message on the console).
any help is will be appreciated,
thanks.
Asher Bitton
Stevie, asap...
Using Disk Utility in Mac OS X 10.4.3 or later to verify or repair disks...
http://docs.info.apple.com/article.html?artnum=302672
About Disk Utility's Repair Disk Permissions feature...
http://docs.info.apple.com/article.html?artnum=25751
Similar Messages
-
Hi
Workflow mails are not sent.
The global preference was set as Do not send emails, we changed the same to mail with attachments. After that we ran resend failed or undelivered messages request. Even then the messages are not sent.
mail_status is null in wf_notifications table for all of these messages.
None of the activities are errored.
I appreciate if any body faced similar situation and can point me where things are going wrong.
Thanks
PrasadThe notifications that were sent when the preference was set to "Do not send mail" are not considered failed or undelivered. Those notifications at the time they were sent were not supposed to be sent as e-mail.. so not sent. If you want them to sent as e-mail, you will have to manually update the MAIL_STATUS to MAIL, run $FND_TOP/sql/wfntfqup.sql to rebuild the mailer queue. This will take care of sending all those e-mails.
-
Package javax.mail does not exist (Still having trouble)
Good Morning
I know that there are several posts regarding issues with javamail. I have viewed them for the past hour. While several of them address my issue I have been unable to locate a solution.
Bare with me please, I am making this post very thorough. The other threads I have read are frusterating because the problems people tend to post are not clear.
I am trying to run "msgsend" which is a provided demo of javamail-1.4 using command prompt (start - run - cmd) with the javac command.
The output below is directly pasted from command prompt and written in bold.
C:\download\javamail-1.4\demo>javac msgsend.java
C:\download\javamail-1.4\demo>javac msgsend.java
msgsend.java:44: package javax.mail does not exist
import javax.mail.*;
^
msgsend.java:45: package javax.mail.internet does not exist
import javax.mail.internet.*;
^
msgsend.java:140: cannot find symbol
symbol : class Session
location: class msgsend
Session session = Session.getInstance(props, null);
^
msgsend.java:140: cannot find symbol
symbol : variable Session
location: class msgsend
Session session = Session.getInstance(props, null);
^
msgsend.java:145: cannot find symbol
symbol : class Message
location: class msgsend
Message msg = new MimeMessage(session);
^
msgsend.java:145: cannot find symbol
symbol : class MimeMessage
location: class msgsend
Message msg = new MimeMessage(session);
^
msgsend.java:147: cannot find symbol
symbol : class InternetAddress
location: class msgsend
msg.setFrom(new InternetAddress(from));
^
msgsend.java:151: package Message does not exist
msg.setRecipients(Message.RecipientType.TO,
^
msgsend.java:152: cannot find symbol
symbol : variable InternetAddress
location: class msgsend
InternetAddress.parse(to,
^
msgsend.java:154: package Message does not exist
msg.setRecipients(Message.RecipientType.CC,
^
msgsend.java:155: cannot find symbol
symbol : variable InternetAddress
location: class msgsend
InternetAddress.parse(cc,
^
msgsend.java:157: package Message does not exist
msg.setRecipients(Message.RecipientType.BCC,
^
msgsend.java:158: cannot find symbol
symbol : variable InternetAddress
location: class msgsend
InternetAddress.parse(bcc,
^
msgsend.java:167: cannot find symbol
symbol : class MimeBodyPart
location: class msgsend
MimeBodyPart mbp1 = new MimeBodyPart();
^
msgsend.java:167: cannot find symbol
symbol : class MimeBodyPart
location: class msgsend
MimeBodyPart mbp1 = new MimeBodyPart();
^
msgsend.java:169: cannot find symbol
symbol : class MimeBodyPart
location: class msgsend
MimeBodyPart mbp2 = new MimeBodyPart();
^
msgsend.java:169: cannot find symbol
symbol : class MimeBodyPart
location: class msgsend
MimeBodyPart mbp2 = new MimeBodyPart();
^
msgsend.java:171: cannot find symbol
symbol : class MimeMultipart
location: class msgsend
MimeMultipart mp = new MimeMultipart();
^
msgsend.java:171: cannot find symbol
symbol : class MimeMultipart
location: class msgsend
MimeMultipart mp = new MimeMultipart();
^
msgsend.java:185: cannot find symbol
symbol : variable Transport
location: class msgsend
Transport.send(msg);
^
msgsend.java:193: cannot find symbol
symbol : class Store
location: class msgsend
Store store = null;
^
msgsend.java:195: cannot find symbol
symbol : class URLName
location: class msgsend
URLName urln = new URLName(url);
^
msgsend.java:195: cannot find symbol
symbol : class URLName
location: class msgsend
URLName urln = new URLName(url);
^
msgsend.java:212: cannot find symbol
symbol : class Folder
location: class msgsend
Folder folder = store.getFolder(record);
^
msgsend.java:218: cannot find symbol
symbol : variable Folder
location: class msgsend
folder.create(Folder.HOLDS_MESSAGES);
^
msgsend.java:220: cannot find symbol
symbol : class Message
location: class msgsend
Message[] msgs = new Message[1];
^
msgsend.java:220: cannot find symbol
symbol : class Message
location: class msgsend
Message[] msgs = new Message[1];
27 errors
Here are the methods I have tried...
1. Make sure you have most current version of Java
2. Reinstall Java
3. Attempt to compile in an IDE (Attempted in Eclipse 3.2)
4. Set class path
Some sources suggest "CLASSPATH" some suggest "CLASS PATH" as the variable name. I have tried both.
Below is what the classpath looks like in bold.
Variable Name: CLASS PATH
Variable value: c:\download\javamail-1.4\mail.jar;C:\download\jaf-1.1\activation.jar;.
I have double checked all folder names and copy pasted all entries to eliminate typos. Javamail-1.4 and jaf-1.1 are both located in c:\download which is the same location Class Path points to.
Thank you very much for your input and effort. I can imagine how frusterating it is responding to 20million javamail posts :) (that may be a bit of an overstatement!)
Thank you again!
Irbi
Message was edited by:
irbi
Message was edited by:
irbiYes - I have read that part of the README and did exactly as it has said in a previous attempt. I should have mentioned that here I'm sorry :)
I moved the .jar files into the download folder and set the classpath exactly as the readme shows.
When I do that the msgsend.java compiles correctly but it still does not run.
Below is what happens.
C:\download\javamail-1.4\demo>set CLASSPATH=%CLASSPATH%;c:\download\javamail-1.4
\mail.jar;%CLASSPATH%;c:\download\jaf-1.1\activation.jar.
C:\download\javamail-1.4\demo>javac msgsend.java
C:\download\javamail-1.4\demo>java msgsend.java
Exception in thread "main" java.lang.NoClassDefFoundError: msgsend/java
C:\download\javamail-1.4\demo>
I have tried fixing this error as well via forums and FAQs but it seems to be the most generic error.
One suggestion was to clear your classpath. I tried this with a test hello world program which was giving the same error - "NoClassDefFoundError". By clearing the classpath I was able to get the hello world program to run without this error. But I can't just clear the classpath in this instance because it needs to point to mail.jar and activation.jar for the program to compile.
Thanks again for all of your efforts. You are more appreciated than you know. -
Error: Javax.mail does not exist, please help
I have copies mail.jar and activation.jar in the classpath directory as instructed, then try to compile but got the below error: package javax.mail does not exist
please help.
G:\CRD>javac SendMailBean.java
SendMailBean.java:22: package javax.mail does not exist
import javax.mail.*; //JavaMail packages
^
SendMailBean.java:23: package javax.mail.internet does not exist
import javax.mail.internet.*; //JavaMail Internet packages
^
SendMailBean.java:43: cannot resolve symbol
symbol : class Session
location: class SendMailBean
Session l_session = Session.getDefaultInstance(l_props, null);
^
SendMailBean.java:43: cannot resolve symbol
symbol : variable Session
location: class SendMailBean
Session l_session = Session.getDefaultInstance(l_props, null);
^
SendMailBean.java:48: cannot resolve symbol
symbol : class MimeMessage
location: class SendMailBean
MimeMessage l_msg = new MimeMessage(l_session); // Create a New message
^
SendMailBean.java:48: cannot resolve symbol
symbol : class MimeMessage
location: class SendMailBean
MimeMessage l_msg = new MimeMessage(l_session); // Create a New message
^
SendMailBean.java:50: cannot resolve symbol
symbol : class InternetAddress
location: class SendMailBean
l_msg.setFrom(new InternetAddress(p_from)); // Set the From address
^
SendMailBean.java:53: package Message does not exist
l_msg.setRecipients(Message.RecipientType.TO,
^
SendMailBean.java:54: cannot resolve symbol
symbol : variable InternetAddress
location: class SendMailBean
InternetAddress.parse(p_to, false));
^
SendMailBean.java:57: package Message does not exist
l_msg.setRecipients(Message.RecipientType.CC,
^
SendMailBean.java:58: cannot resolve symbol
symbol : variable InternetAddress
location: class SendMailBean
InternetAddress.parse(p_cc, false));
^
SendMailBean.java:62: package Message does not exist
l_msg.setRecipients(Message.RecipientType.BCC,
^
SendMailBean.java:63: cannot resolve symbol
symbol : variable InternetAddress
location: class SendMailBean
InternetAddress.parse(p_bcc, false));
^
SendMailBean.java:68: cannot resolve symbol
symbol : class MimeBodyPart
location: class SendMailBean
MimeBodyPart l_mbp = new MimeBodyPart();
^
SendMailBean.java:68: cannot resolve symbol
symbol : class MimeBodyPart
location: class SendMailBean
MimeBodyPart l_mbp = new MimeBodyPart();
^
SendMailBean.java:72: cannot resolve symbol
symbol : class Multipart
location: class SendMailBean
Multipart l_mp = new MimeMultipart();
^
SendMailBean.java:72: cannot resolve symbol
symbol : class MimeMultipart
location: class SendMailBean
Multipart l_mp = new MimeMultipart();
^
SendMailBean.java:83: cannot resolve symbol
symbol : variable Transport
location: class SendMailBean
Transport.send(l_msg);
^
SendMailBean.java:98: cannot resolve symbol
symbol : class MessagingException
location: class SendMailBean
} catch (MessagingException mex) { // Trap the MessagingException Error
^
19 errorsAnother person who doesn't understand how to set CLASSPATH.
Move those JARs into the same directory as your SendMailBean.java and do it like this:
javac -classpath .;mail.jar;activation.jar -d . *.java
java -classpath .;mail.jar;activation.jar SendMailBeanRead how to set CLASSPATH properly:
http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/classpath.html -
Javax.mail.MessagingException: Not Connected
Hi All,
I am trying to read the message from pop.gmail.com using JavaMail API.I ma using POP3 protocol for it.
But I got the following Exception
javax.mail.MessagingException: Not Connected
at com.sun.mail.pop3.POP3Store.checkConnected(POP3Store.java:279)
at com.sun.mail.pop3.POP3Store.getFolder(POP3Store.java:261)
at MailReceipt.connect(MailReceipt.java:97)
at MailReceipt.mailRecieve(MailReceipt.java:62)
at MailReceipt.main(MailReceipt.java:53)
I got This Error at the line
folder = store.getFolder("INBOX");
in my program.
Please Help me ion this regards.Thanks in Adnavce..
Thanx & Regards
Sandeep VermaWell, I've never used this API but it seems 100% clear what's wrong. And 5 seconds with Google has revealed that there's a method on that class which looks like it will address the issue.
If you can't even read basic error messages, you should seriously question whether you should be programming. -
Javax.mail does not exist
I would like to thank warnerja for your advise about the classpath.
Thanks for the classpath information regarding the .jar files. Now when I start tomcat cat it runs appropriately. However I am still having a problem when i try to compile the message send demo. The message I get is javax.mail does not exist,(import javax.mail.) when I downloade the mail api I placed on the root of my D drive and i placed the mail and activation jar files in my lib folded of my Jakarta-3.2.1 lib folder. I graduated Chubb Institute back in october and am currently still looking for work so my memory but be a little fuzzy as to whether or not this is correct. Your help is greatly appreciated.If you are just compiling the classes then you should check that the mail.jar file is in your compiler classpath. How you check and set it depends on how you are compiling it and on what system etc.
-
Package javax.mail does not exist. Please Help !
Hi all,
I am new to Java and I downloaded some sample application and when I try to compile it, I get an error:
"package javax.mail does not exist".
I've looked through forums and I know something is wrong with CLASSPATHS and that I also have to download the java mail package, but I dont know how to exactly fix this problem. I would appreciate very much if someone could help me, maybe by telling me the steps I need to take.
Thanks.Hey Rom,
Thanks for reply.
The sample application is an authentication module:
http://java.sun.com/j2se/1.4.2/docs/guide/security/jaas/tutorials/GeneralAcnOnly.html
But I think this doesnt really matter, as the error I get is because I have manually added the : import java.mail.*; statement. (Maybe I had to mention it in the previous post). Because I want to add some mail client inside.
I am compiling it using the command: javac, from the commandline menu. -
Unable to send email of photo in either a collection or in a HD Mac folder. The address is validated. Progress bar functions to end of "sending email" The "email not sent" Suggestions please.
Hi,
According to your description, I find that there is a single user cannot send email.
I suggest using Outlook on Windows machine and sending emails via this single user to verify whether the emails can be sent.
If the single user can send email via Outlook on Windows machine, it seems an issue on the Mac side.
I suggest asking Outlook for Mac Forum for help so that we can get more professional suggestions.
For your convenience:
http://answers.microsoft.com/en-us/mac/forum/macoutlook?tab=Threads
If can't send emails in Outlook, it seems an issue on the single user side.
I suggest trying to access the single user's mailbox via OWA to verify whether the mailbox has been migrated completely.
Thanks
Mavis
If you have feedback for TechNet Subscriber Support, contact
[email protected]
Mavis Huang
TechNet Community Support -
Email not sent with entry not in queue status in SOST
Hi,
I've used SO_DOCUMENT_SEND_API1 FM to send PDF file of SAPScript. However, the mail is not sent to the recipient and the status of the mail in SOST is "Entry not in queue".
Ive debug the program and the the sy-subrc of the FM is 0, and there goes the confusion... Why was it not sent to the recipient when the FM doesnt record any error?
Please help...
Rgds,
MarkHi,
If it works add this piece of code after ur FM..
If sy-subrc eq 0.
commit-work.
wait up to 1 seconds.
submit rsconn01 with mode 'INT' and return.
endif.
Cheers,
jose. -
Email not sent when rejecting time
Email not sent when rejecting time in approval view in MSS.
Works when done in CATS_APPR_LITE, but not from MSS approval view.
Have checked user email in su01, SMTP config in SCOT, and verified with SOST.
Nothing in the default.trc log.
Any clues on how to proceed locating the error ?check the MSS profile being used, there you have a setting
If I reject the
time in UWL and made sure that the Profile has the field
(V_CATS_APPR_CUST-SEND_MAIl) is active, then the Notification message
is available in the SBWP for the employee.
SPRO > Cross-Application Components >
Time Sheet > Settings for All User
Interfaces > Approval Procedure >
Approve Working Times > Define Profiles
and Assign to Views > 'Rejection'
checkbox field
(V_CATS_APPR_CUST-SEND_MAIl) is active -
Javax.mail.*; not being seen by portal in EP 6
Hello All,
It seems that when I deploy the following code:
package com.giggity;
import java.util.Properties;
import javax.mail.*;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.AddressException;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import com.sapportals.portal.prt.component.AbstractPortalComponent;
import com.sapportals.portal.prt.component.IPortalComponentRequest;
import com.sapportals.portal.prt.component.IPortalComponentResponse;
public class Mailer extends AbstractPortalComponent
public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
Properties p = System.getProperties();
p.put("mail.host", "stmail");
try{
MimeMessage message =
new MimeMessage(Session.getInstance(p, null));
message.setFrom(new InternetAddress("[email protected]")); message.setRecipients(Message.RecipientType.TO, InternetAddress.parse("[email protected]"));
message.setSubject("No work");
message.setText("Does not work");
Transport.send(message);
catch(Exception e)
I get a javax/mail/Address ClassNotFoundException. In
the IDE (Eclipse with PDK plugin, not using NW04), it
compiles and builds just fine. What is the problem?
Thanks.
-GregSuccessful compilation or building in the eclipse/NWDS does not mean that it can be successfully deployed on the portal. If the Java build path has all the required jars, any project compiles and builts fine but that build path is not transported to the portal( see inside any par file, there won't be any .classpath and .project files. They are local only files).
========
Add all your third party jar files to the component in this path( ..\dist\PORTAL-INF\lib). There is no need to add mail.jar as it's already available in sap j2ee engine. So add these lines to the portalapp.xml. (as told by jagdeep)
<application-config>
<property name="PrivateSharingReference" value="SAPJ2EE::library:mail"/>
</application-config>
Regs,
Bobby -
Javax.mail. package not recognised
Hi people!!!!
Please help me out as I am new to j2ee/JavaMail
I have the j2ee sdk 1.4 installed as well as j2se1.4.2/netbeans conbundle.
I would create to a simple application that sends an email. However, the compiler doesn't recognise the javax.mail.* and javax.mail.internet.* packages.
When I type j2ee -verbose at the command prompt it states that it doesn't recognise the command.
I have set my environment variables as follows:
J2EE_PATH: C:\Sun\AppServer\
J2EE_HOME: C:\Sun\AppServer\
JAVA_HOME: C:\Program Files\j2sdk_nb\j2sdk1.4.2\
System Variables:
CLASSPATH: C:\Sun\AppServer\lib\j2ee.jar
PATH: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\MSSQL7\BINN;C:\Program Files\j2sdk_nb\j2sdk1.4.2\bin\;C:\TOOLS\Tomcat4.1\webapps\Intranet\WEB-INF\classes\;C:\Sun\AppServer\bin\
Do perhaps know what I have not done correctly....
Thanks, any assistance will be much appreciated.
You may email your answers to me at [a href='mailto:[email protected]'][email protected][\a] if you wish
Regards
UshantaHey I have added the mail.jar file to my classpath and I don't get this error any more.... Unfortunately, though I get a java.lang.NoClassDefFoundError Exception in thread 'main'
I do have a main method, here is my code:
import javax.mail.*;
import javax.mail.internet.*;
import java.util.Properties;
import java.io.*;
* @author user
public class SimpleSender {
/** Creates a new instance of SimpleSender */
public SimpleSender() {
public static void main(String[] args) {
if (args.length != 3) {
System.out.println("ERROR");
System.exit(1);
String host = args[0];
String to = args[1];
String from = args[2];
String contentType = "text/html";
Properties props = System.getProperties();
props.put("mail.smtp.host", args[0]);
try{
Session session = Session.getDefaultInstance(props, null);
MimeMessage message = new MimeMessage(session);
message.setSubject("Hello");
message.setFrom(new InternetAddress(from));
message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
String text = "<h1>testing email</h1>";
message.setContent(text, "text/html");
Transport.send(message);
} catch (MessagingException e) {
e.printStackTrace();
} -
After loading Lion, I noticed outgoing mssgs are not sent, but end up in my Out box. try to resend, but no help.
Sent: checked box @ Store sent messages on the
server (and that's how I realized there was a
problem, since nothing new was showing up, despite
"sending" emails).
Not sure what you mean here. It could very well be that the problem only happens when storing the messages on the server and disabling that option (i.e. storing the messages locally) would "fix" it. Other than allowing the problem to happen, what does enabling that setting accomplish that helps you "realize" there is a problem?
Expand the Sent group in the mailboxes list by clicking the triangle on the left if necessary. Does a mailbox for the .Mac account appear there? If so, select it and choose Use This Mailbox For from the Mailbox menu. Do the options there appear selectable or grayed out?
How is your mailboxes list organized in Mail? Do you see a globe icon for the .Mac account at the bottom of the list? Do you see a Sent Messages mailbox with a standard folder icon anywhere in the list, maybe as part of the .Mac account group?
In the Finder, go to HOME/Library/Mail/Mac-username/. With that folder open, do Edit > Select All (⌘A), then Edit > Copy (⌘C), and paste it in your reply to this post, to let me see whether there is something amiss within your account folder. -
E-Mail is not sent for "Expense report reimbursed"
Hello,
When the expense report status changes to "Reimbursed", an email should be sent to the employee. But it is not being sent.
FYI, both in Business Configuration --> Fine Tune Activity and Personalize --> My Data setting of employee, the email option is enabled for E-Mail Type "Expense report reimbursed". But still email is not sent out when the expense report is reimbursed.
Best regards,
HariThanks Joachim! Just to let others know, here is the reply I got in the incident.
Your tenant is with SAP Cloud for Travel and Expense release 1311. In this release your finding is valid that some system glitch causes the e-mail not to be sent for reimbursed expense report. This issue should have been fixed in release 1402. Because now the upgrade to release 1402 has begun and all tenants will be upgraded to 1402 in several weeks, we may not fix the issue on 1311 tenants. Anyway the main features of handling expense reports in the system should work as expected.
Best regards,
Hari -
Workflow for approval is working fine but no email is sent to approver in SOST when the shopping cart is ordered. However, there is a message for approval in Inbox in SRM 5.0.
I have check marked all options for all roles in the Shopping Cart scenario in SPRO->u2026->Determine recipient of notifications. Mail is set up in SCOT with Internet Address Area set to *. On the users in SU01 I am only using internal email addresses where communication is set to Email (could I also use Remote Email?). I have set the FORWARD_WI=X attribute in ppoma_bbp for all users. In SO16 I have set the radio button for "Send to users home address".
In SOST I can see mails when a SC has been changed, rejected, and approvedu2026 but not any mail notification when a SC is sent for approval.
Do you have a solution or any sugestions to fix this problem?
Best regards
NielsHi,
In SRM 5.0,report RBBP_NOTIFICATION_OFFAPP is used scehdule offline approval mails .Please see whether this program has been scehduled to send the offline mails.
Also goto tcode SBWP and create a test mail and see whether you can see the entry for that mail in tcode SOST.
Please see the foll link for more deatils:
SRM5.0:
http://help.sap.com/saphelp_srm50/helpdata/en/31/ec423b4ac8d506e10000000a11402f/frameset.htm
SRM 4.0:
http://help.sap.com/saphelp_srm2007/helpdata/en/31/47c6cb8e9249f2bc29444212e4704a/frameset.htm
You need to check the settings mentioned in the link above before you scehdule the report for snding the approval mails to the external email ID's of the approvers.
The job mentioned are only for sending the approval mails.To send the requester notification messages to external mail box (instead of SRM inbox),see the foll thread for more pointers:
Re: mail refuse shopping cart
Do let me know if you need an further help.
BR,
Disha.
Maybe you are looking for
-
Having problems trying to install itunes? getting all sorts of errors!
Just 2 days ago i uninstalled itunes because it wasn't letting me update to ios5. So i uninstalled it. Then when i tried to install it came up with an error occurred during the installation of assembly"Microsoft.VC80.CRT.type="win32",version="8.0.507
-
How can I get rid of the spinning rainbow?
-
How to get on my ipod when password not working?
how to reset my password on my ipod?
-
How to eliminate # for empty date value in BEx Analyser
Hi Gurus, Can any one please let me know how to eliminate # for empty date value in BEx Analyser. Thanks in advance peter
-
I need flex sdk 4 to do loading file data
Looks like I need flex sdk 4 to do loading file data as can be seen from the following thread: http://forums.adobe.com/thread/510429?tstart=0 Hi there, I'm now trying to use the new file features in Flash 10 but I'm getting this error when I try some