Sendmail 8.10.2+Sun
After applying the recommended patches for Solaris 7, the outbound mail is identified as from "[email protected]", vs "user@domain" as before updating from 8.9.3+Sun version.
Suspect things are actually working OK. ;-)
I'm guessing here as you haven't given much detail, but if you use the Exchange server the HTML comes out as HTML - via Sendmail it is treated as plain text??
If so -
Exchange is NOT a true Internet standards compliant mail server. It changes message content as it sees fit and it tends to assume you will read the mail using M$ Outlook.
HTML tags in a text/plain message SHOULD be just that - plain text. If you want to send HTML then do so in a text/html type email. Even better send it as a multipart mime alternative message which should give the recipients software the choice of which format to display (Microsoft Exchange not withstanding).
SH
Similar Messages
-
Sendmail broken from Solaris 10 11/06 to Solaris 10 8/07 - port 25 broken
I am in the process of building a new solaris 10 8/07 server to replace a solaris 10 11/06 server. Both are running.
Sendmail on both has changes limited to:
correcting /etc/hosts to include mailhost entry
dns server pointing to localhost as mailhost
local-host-names set on each
aliases set up and newaliases run
Otherwise, the configuration files are standard and both are running the as shipped main.cf.
svcadm enable -r network/smtp seems to work fine and the services show as enabled
The 11/06 server has run fine for close to a year.
The 8/07 server has mconnect work fine to localhost but I get connection denied when I try to come in via the ip number.
TCP Wrappers are not running, but even then I have hosts.allow set with lots of variations of ALL: ALL.
No errors in /var/log/syslog.
How do I figure out what is happening on the port and why it is not connecting?
# mconnect localhost
connecting to host localhost (127.0.0.1), port 25
connection open
220 mailhost.molten-rock.com ESMTP Sendmail 8.13.8+Sun/8.13.8; Sun, 4 Nov 2007 16:44:25 +1300 (NZDT)
# mconnect magma
connecting to host magma (192.168.25.250), port 25
connect: Connection refused
# uname -a
SunOS magma 5.10 Generic_127112-02 i86pc i386 i86pc
# svcs | grep smtp
online 15:45:50 svc:/network/smtp:sendmailThanks, but had found a previous discussion with this hint and applied it.
svccfg -s sendmail listprop shows config /local_only = false
Yes, I would really love to fix the fault, but what I would really like is some hints as to how to debug ports under svc control. -
How can i do spamfilter for sendmail for solaris 10 ? how easy is to install and configure spamassasing on solaris 10
can i add some rules in sendmail configuration file to block the spams . i had googled it but the solution i found were for linux sendmail and did not find any for solaris 10
Any help is greatly appreciated
currently our sendmail.cf has is defined as below
divert(0)dnl
VERSIONID(`@(#)sendmail.mc 1.11 (Sun) 06/21/04')
OSTYPE(`solaris8')dnl
DOMAIN(`solaris-generic')dnl
define(`confFALLBACK_SMARTHOST', `mailhost$?m.$m$.')dnl
MAILER(`local')dnl
MAILER(`smtp')dnl
LOCAL_NET_CONFIG
R$* < @ $* .$m. > $* $#esmtp $@ $2.$m $: $1 < @ $2.$m. > $3
~
~Information on the anti-spam properties in sendmail is contained in the /etc/mail/cf/README file.
here's the link from sendmail.org:
cf/README - Anti-Spam Configuration Control -
Sendmail creating many mail.local process
I have configured sendmail 8.13.8 on Solaris 10. The issue is that after sendmail configuration, i found that many mail.local process are created & this hangs the server. Below is the config file sendmail.mc i used for configuration to relay messages to another server. I compiled this file & copied it to /etc/mail folder as sendmail.cf. After this i restarted sendmail. After couple of hours, many mail.local process are created
divert(-1)
divert(0)dnl
VERSIONID(`@(#)sendmail.mc 1.11 (Sun) 06/21/04')
OSTYPE(`solaris8')dnl
DOMAIN(`solaris-generic')dnl
define(`confFALLBACK_SMARTHOST', `mailhost$?m.$m$.')dnl
MAILER(`local')dnl
MAILER(`smtp')dnl
LOCAL_NET_CONFIG
R$* < @ $* .$m. > $* $#esmtp $@ $2.$m $: $1 < @ $2.$m. > $3
Now i am running a cron job temporarily to kill these process.I m stuck. Need ur help guys...
-
Sendmail---Mailer Daemon query
If this is the correct forum i am posting in please read further otherwise you may redirect me to correct link.
I want to control Sendmails Mailer-Daemon messages.
When a user sends mail to a list maintained using aliases
and one or more accounts specified in alias file are not existing.....instead of sending a bounced message from
Mailer-Daemon to Sender....can i direct this bounced mail
to system administrartor...so that he can remove those names from alias file....
For example....
I send a mail to list [email protected] where "list" is an alias file at listserver.com with accounts:
account1
account2....and so on till accountN
Suppose one or more accounts are not existing now but
these have not been removed from "list"....Obviously i will get MAiler-Daemon for that....So instead of me receiving these bounced mails...can i redirect them to system
administrator...
Thanks in advance...Our sendmail expert says to read
http://www.sendmail.org/faq/section3.html#3.15
More appropriate places for sendmail support would be
http://sendmail.org , http://supportforum.sun.com/network ,
http://sun.com/bigadmin , or http://opensolaris.org/os/community/networking . -
If this is the correct forum i am posting in please read further otherwise you may redirect me to correct link.
I want to control Sendmails Mailer-Daemon messages.
When a user sends mail to a list maintained using aliases
and one or more accounts specified in alias file are not existing.....instead of sending a bounced message from
Mailer-Daemon to Sender....can i direct this bounced mail
to system administrartor...so that he can remove those names from alias file....
For example....
I send a mail to list [email protected] where "list" is an alias file at listserver.com with accounts:
account1
account2....and so on till accountN
Suppose one or more accounts are not existing now but
these have not been removed from "list"....Obviously i will get MAiler-Daemon for that....So instead of me receiving these bounced mails...can i redirect them to system
administrator...
Thanks in advance...Our sendmail expert says to read
http://www.sendmail.org/faq/section3.html#3.15
More appropriate places for sendmail support would be
http://sendmail.org , http://supportforum.sun.com/network ,
http://sun.com/bigadmin , or http://opensolaris.org/os/community/networking . -
Sendmail and tcp_wrappers
Hi all,
According to the documentation, in solaris 10 access to sendmail should be controllable through tcp_wrappers, but I can't seem to get it to work like it should.
I've edited the /etc/hosts.allow to this:
sendmail: 127.0.0.1
But when I try and connect from another machine it still allows me access:
[user@othermachine ~]$ telnet box 25
Trying 10.37.5.91...
Connected to box.
Escape character is '^]'.
220 box ESMTP Sendmail 8.13.6+Sun/8.13.6; Mon, 24 Apr 2006 14:57:08 +0200 (MEST)
I've used truss on the sendmail process, and can see it actually opening /etc/hosts.allow:
507: open("/etc/hosts.allow", O_RDONLY) = 6
507: fstat64(6, 0xFFBFCF58) = 0
507: fstat64(6, 0xFFBFCE00) = 0
507: ioctl(6, TCGETA, 0xFFBFCEE4) Err#25 ENOTTY
507: read(6, " s e n d m a i l : l o c".., 8192) = 122
507: read(6, 0x0016B71C, 8192) = 0
507: llseek(6, 0, SEEK_CUR) = 122
507: close(6) = 0
507: open("/etc/hosts.deny", O_RDONLY) = 6
507: fstat64(6, 0xFFBFCF58) = 0
507: fstat64(6, 0xFFBFCE00) = 0
507: ioctl(6, TCGETA, 0xFFBFCEE4) Err#25 ENOTTY
507: read(6, " A L L : A L L\n s e n d".., 8192) = 21
507: llseek(6, 0xFFFFFFFFFFFFFFF3, SEEK_CUR) = 8
507: close(6) = 0
507: fstat(4, 0xFFBFD338) = 0
507: time() = 1145882218
507: getpid() = 507 [475]
507: putmsg(4, 0xFFBFC9F0, 0xFFBFC9E4, 0) = 0
507: open("/var/run/syslog_door", O_RDONLY) = 6
I've also installed the latest sendmail patch ( 122856-01 ).
If anyone can shed some light on this i'd be appreciated.
Thanks in advance!Just went through this with support. Sendmail should use tcp wrappers by default.
Check:
If you run the command:
# /usr/lib/sendmail -d0.1 < /dev/null
Does the output show tcpwrappers as it does below:
# /usr/lib/sendmail -d0.1 < /dev/null
Version 8.13.4+Sun
Compiled with: DNSMAP LDAPMAP LOG MAP_REGEX MATCHGECOS MILTER MIME7TO8
MIME8TO7 NAMED_BIND NDBM NETINET NETINET6 NETUNIX NEWDB NIS
NISPLUS PIPELINING SCANF STARTTLS TCPWRAPPERS USERDB
USE_LDAP_INIT XDEBUG
*** Now, the meat... if tcp wrappers is indicated as above, connect & try mail from command. sendmail always allows the connection, but if blocked by wrappers, mail from will be disallowed. It's not intuitive, since other tcp wrappers don't allow any connection when a host is denied. And, Sun ought to document better, since we're counting on them!
E.g. (mconnect is Solaris command, like telnet to port 25, actual info changed to protect us):
mconnect mailserver
connecting to host mailserver (10.1.1.25), port 25
connection open
220 mailserver.domain.net ESMTP Sendmail 8.13.6+Sun/8.13.6; Tue, 25 Apr 2006 14:54:45 -0400 (EDT)
MAIL FROM:[email protected]
550 5.0.0 Access denied -
Configure NTP and sendmail configuration on T5240
Hi Sun gurus
Can some one let me know how can i configure the NTP & SENDMAIL configuration on T5240 sun sparc.Your anaswer will be highly appreciated.
Regards
etc.NTP is the easy part- do you want your machine to be an NTP server (that can serve out time updates to other local machines) or an NTP client (able to receieve time updates from a nearby NTP server).
Either way, it's fairly straightforward. For an NTP server- first you'll need a lower stratum external NTP server to use as a reference (unless you have a GPS clock on-site- in which case you can be your own strarum 1 server). You can look at the lists of available public NTP servers on [ntp.org|http://psp2.ntp.org/bin/view/Servers/WebHome] - check their usage guidelines- some server owners prefer it if you email them for permission before you list them as a peer to keep their traffic in check (or just use the ntp pool cloud).
Once you select a server (or a few servers) to use for reference you simply need to adjust your ntp.conf file:
cp /etc/inet/ntp.server /etc/inet/ntp.conf
vi /etc/inet/ntp.conf
change the line
server 127.127.XType.0
to
server (IP address of the external ntp server)
or
server 0.pool.ntp.org
if you're going to use the public ntp pool
if you want to list more than one server as a peer, you can make additional "server" lines- such as
server 1.pool.ntp.org
server 2.pool.ntp.org
etc...
comment out the "fudge 127.127.XType.0 stratum 0" line
save and exit.
touch /var/ntp/ntp.drift
(need to create an empty file for ntp to use to log clock drift stats)
and enable the ntp service
svcadm enable svc:/network/ntp
If you want your machine to be just an ntp client... do this instead...
cp /etc/inet/ntp.client /etc/inet/ntp.conf
svcadm enable svc:/network/ntp
Sorry but I can't answer the sendmail question. Starting the service itself is easy, configuring it is another story (and the topic of an entire O'Rielly book). -
Add email subject to maillog (sendmail log file)
I need to add the email subject to sendmail (8.13.8+Sun). I understand I can do that in the sendmail.cf How can I do this for both the local.cf and sendmail.cf, and even the submit.cf so I can see the subject in all the maillog entries.
This is a solaris 10 server. I found 2 of the same suggestions that did not work.
I added this to my sendmail.mc file and rebuilt but the subject did not appear in the logs.
LOCAL_CONFIG
Klog syslog
HSubject: $>Log_Subject
LOCAL_RULESETS
SLog_Subject
R$* $: $(log Subject: $1 $) $1
ThanksI got this to work. I had to link both local.cf and sendmail.cf to the resulting file.
LOCAL_CONFIG
Klog syslog
HSubject: $>+CheckSubject
LOCAL_RULESETS
SCheckSubject
R$* $: $(log Subject: $1 $) $1 -
Sending mail to multiple recipients
Hello friends,
i have written java code for sending mail,its working fine for single mail address. if we include multiple mail address its giving ERROR:" Illegal route-addr in string" , so friends if there is any solution for this problem: please kindly reply. i have included sendmail->code and setproperty-> and the exact exception.
SENDMAIL
public boolean sendMail(User userObj, Message message, String content){
try{
util util=new util();
String arr[]=util.getTokens(userObj.email,",");
InternetAddress inetarr[]=new InternetAddress[arr.length];
for(int i=0;i<arr.length;i++){
inetarr=new InternetAddress(arr[i].toString());
message.setRecipients(Message.RecipientType.TO, inetarr);
MimeMultipart multipart=new MimeMultipart();
BodyPart msgBodyPart=new MimeBodyPart();
msgBodyPart.setContent(content, "text/html");
multipart.addBodyPart(msgBodyPart);
message.setContent(multipart);
message.setSentDate(new Date());
Transport.send(message);
return true;
}catch(Exception e){
e.printStackTrace();
return false;
}//End Of The Method
GETPROPRITIES
protected Properties getProperties(){
Properties props = new Properties();
props.put("mail.smtp.starttls.enable","true");
props.put("mail.transport.protocol", "smtp");
props.put("mail.smtp.host", adminObj.info.server[0]);
props.put("mail.smtp.port",adminObj.info.server_port[0]+"");
props.put("mail.debug","false");
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.quitwait", "false");
props.put("mail.smtp.sendpartial", "true");
return props;
}//End Of The Method
Exception
javax.mail.internet.AddressException: Illegal route-addr in string ``saravana.07
@gmail.com,[email protected]''
at javax.mail.internet.InternetAddress.checkAddress(InternetAddress.java
:883)
at javax.mail.internet.InternetAddress.parse(InternetAddress.java:819)
at javax.mail.internet.InternetAddress.parseHeader(InternetAddress.java:
580)
at javax.mail.internet.MimeMessage.getAddressHeader(MimeMessage.java:680
at javax.mail.internet.MimeMessage.getFrom(MimeMessage.java:340)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:897)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:583)
at javax.mail.Transport.send0(Transport.java:169)
at javax.mail.Transport.send(Transport.java:98)
at common.application.utilities.TenderMail.sendMail(TenderMail.java:483)
at common.application.mail.send_user_mail.__BodhiReceive(send_user_mail.
java:146)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at jdbs.BodhiServer.callStation(Unknown Source)
at jdbs.BodhiSend.doSend(Unknown Source)
at common.application.mail.sendmail.__BodhiReceive(sendmail.java:361)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at JumpForwarder1.callStation(JumpForwarder1.java:863)
at JumpForwarder1.processRequest(JumpForwarder1.java:613)
at JumpForwarder1.authenticateUserAndExecute(JumpForwarder1.java:254)
at JumpForwarder1.doPost(JumpForwarder1.java:132)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:284)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:204)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:257)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
ContextValve.java:245)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:199)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:509)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:184)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:164)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:156)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:20
6)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:833)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:732)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:619)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:688)
at java.lang.Thread.run(Thread.java:534)You seem to be splitting a string containing multiple addresses and constructing
InternetAddress objects for each entry. But looking at the address it's complaining
about, it looks like you failed to split the string properly. You might want to use the
InternetAddress.parse method that will do the splitting for you. -
BPEL 11g fault policy action java class not sending email
Hi All,
I am trying to attach fault policy to my bpel process. The fault conditions are working fine but the email part from the action class is not able to send email. The code execute properly , i can't see any error message in the log but I cant access the email in my inbox.
I am able to send email from using email bpel activity and also test work flow notification from em console.
I have used both the java options for sending email like javax.mail and oracle.sdp.messaging .
JAVA CODE FOR EMAIL javax.mail
public String handleFault(IFaultRecoveryContext iFaultRecoveryContext){
//Print Fault Meta Data to Console
System.out.println("****************Fault Metadata********************************");
System.out.println("Fault policy id: " + iFaultRecoveryContext.getPolicyId());
System.out.println("Fault type: " + iFaultRecoveryContext.getType());
System.out.println("Partnerlink: " + iFaultRecoveryContext.getReferenceName());
System.out.println("Port type: " + iFaultRecoveryContext.getPortType());
System.out.println("**************************************************************");
//print all properties defined in the fault-policy file
System.out.println("Properties Set for the Fault");
//Print Fault Details to Console if it exists
System.out.println("****************Fault Details********************************");
// if(iFaultRecoveryContext instanceof BPELFaultRecoveryContextImpl)
BPELFaultRecoveryContextImpl bpelCtx = (BPELFaultRecoveryContextImpl)iFaultRecoveryContext;
System.out.println("Fault: " + bpelCtx.getFault());
System.out.println("Activity: " + bpelCtx.getActivityName());
System.out.println("Composite Instance: " + bpelCtx.getCompositeInstanceId());
System.out.println("Composite Name: " + bpelCtx.getCompositeName());
System.out.println("***********************************************************");
try {
bpelCtx.addAuditTrailEntry("Sending Email...");
Map props = iFaultRecoveryContext.getProperties();
if (props != null && props.size() > 0) {
setFrom(getParameterValue((ArrayList)props.get("from")));
setTo(getParameterValue((ArrayList)props.get("to")));
setSubject(getParameterValue((ArrayList)props.get("subject")) + bpelCtx.getTitle());
setText(getParameterValue((ArrayList)props.get("text")) + "\n" + "BPEL Process Instance: " + bpelCtx.getInstanceId() + " needs intervention to recover from a technical exception: " + bpelCtx.getFault().getMessage() + ".\n" + "Check the Activities tab in the BPEL Management Console in order to resolve the error as soon as possible.\n" + "This message was automatically generated, please do not reply to it.");
setHost(getParameterValue((ArrayList)props.get("host")));
setPort(getParameterValue((ArrayList)props.get("port")));
bpelCtx.addAuditTrailEntry("to Email getFrom..."+getFrom());
bpelCtx.addAuditTrailEntry("to Email getTo..."+getTo());
bpelCtx.addAuditTrailEntry("to Email getText..."+getText());
bpelCtx.addAuditTrailEntry("to Email getHost..."+getHost());
bpelCtx.addAuditTrailEntry("to Email getPort..."+getPort());
Session mailSession = Session.getDefaultInstance(properties);
Message simpleMessage = new MimeMessage(mailSession);
bpelCtx.addAuditTrailEntry("to Email toAddresses2...");
InternetAddress fromAddress = new InternetAddress(from);
bpelCtx.addAuditTrailEntry("to Email fromAddress..."+fromAddress);
simpleMessage.setFrom(fromAddress);
String[] toAddresses = to.split(";");
if (toAddresses != null && toAddresses.length > 0)
bpelCtx.addAuditTrailEntry("to Email toAddresses3...");
InternetAddress[] toInternetAddresses =new InternetAddress[toAddresses.length];
for (int i = 0; i < toAddresses.length; i++)
bpelCtx.addAuditTrailEntry("to Email toAddresses4444..."+ toAddresses);
toInternetAddresses[i] = new InternetAddress(toAddresses[i]);
bpelCtx.addAuditTrailEntry("to Email toInternetAddresses..."+ toInternetAddresses[i]);
simpleMessage.setRecipients(RecipientType.TO,toInternetAddresses);
simpleMessage.setSubject(subject);
simpleMessage.setText(text);
Transport.send(simpleMessage);
bpelCtx.addAuditTrailEntry("After Email...");
} catch (Exception e) {
bpelCtx.addAuditTrailEntry("fault Message:" + e.getMessage());
//Custom Code to Log Fault to File/DB/JMS or send Emails etc.
return "Manual";
private String getParameterValue(ArrayList parameterList) {
String value = null;
if (parameterList != null && parameterList.size() > 0)
value = (String)parameterList.get(0);
return value;
JAVA CODE FOR EMAIL oracle.sdp.messaging
private void sendMail(IFaultRecoveryContext iFaultRecoveryContext) {
BPELFaultRecoveryContextImpl bpelCtx = (BPELFaultRecoveryContextImpl)iFaultRecoveryContext;
bpelCtx.addAuditTrailEntry("In sendMail...");
Map<String, Object> params = new HashMap<String, Object>();
// params.put(key, value); // if optional parameters need to be specified.
MessagingClient messagingClient;
try {
bpelCtx.addAuditTrailEntry("In sendMail111...");
messagingClient =
MessagingClientFactory.createMessagingClient(params);
Message newMessage = MessagingFactory.createMessage();
// newMessage.setContent(createEventPayload(iFaultRecoveryContext),"text/plain");
newMessage.setContent("Component Name :"+bpelCtx.getComponentName()+ "\n Instacne Id :"+bpelCtx.getComponentInstanceId()+
"\n Composite Instance Id :"+bpelCtx.getCompositeInstanceId()+ "\n Composite Name :" bpelCtx.getCompositeName()
"\n Activity name :"+bpelCtx.getActivityName() + "\n Activity Id :" bpelCtx.getActivityId() "\n ECID :" bpelCtx.getECID()
"\n Reference Name :"+bpelCtx.getReferenceName()+ "\n Title :" bpelCtx.getTitle()
"\n Fault :" + bpelCtx.getFault()+ "\n Port Name :"+bpelCtx.getPortType(), "text/plain");
bpelCtx.addAuditTrailEntry("In sendMail222...");
Address sender = MessagingFactory.createAddress(getFrom());
bpelCtx.addAuditTrailEntry("In sendMail sender..."+sender.toString());
bpelCtx.addAuditTrailEntry("from Email..."+getFrom());
String recipientsStr[] = to.split(";");
bpelCtx.addAuditTrailEntry("to Email..."+getTo());
bpelCtx.addAuditTrailEntry("In sendMail333...");
Address[] recipients = MessagingFactory.createAddress(recipientsStr);
bpelCtx.addAuditTrailEntry("In sendMail444...");
newMessage.addSender(sender);
messagingClient.registerAccessPoint(MessagingFactory.createAccessPoint(sender));
newMessage.addAllRecipients(recipients);
bpelCtx.addAuditTrailEntry("In sendMail5555...");
newMessage.getMessageInfo().setSession(MessageSessionType.INBOUND_SESSION);
newMessage.setSubject(getSubject());
bpelCtx.addAuditTrailEntry("Subject..."+getSubject());
String messageId = "";
bpelCtx.addAuditTrailEntry("In sendMail666...");
synchronized (this) {
bpelCtx.addAuditTrailEntry("In sendMail777...");
messageId = messagingClient.send(newMessage);
bpelCtx.addAuditTrailEntry("In sendMail888...");
Status[] statuses = messagingClient.getStatus(messageId);
bpelCtx.addAuditTrailEntry("In sendMail999...");
} catch (MessagingException e) {
bpelCtx.addAuditTrailEntry("inside exception email fault Message:" + e.getMessage());
//e.printStackTrace();
MESSAGES FROM SOA SERVER OUT LOG after test the bpel process:
===========================================
****************Fault?Metadata********************************
Fault?policy?id:?SimpleFaultPolicy
Fault?type:?bpel
Partnerlink:?Service1
Port?type:?{http://kacst.edu.sa/process/nstip/coPINotifyProcess}kacst_process_nstipCoPIMotifyProcess
Properties?Set?for?the?Fault
****************Fault?Details********************************
Fault:?com.oracle.bpel.client.BPELFault: faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault}
messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage}
parts: {{
summary=<summary>Message Router for nstip/nstip_Pro_CoPiNotificationProcess!1.0*soa_084da522-a825-4aa6-9d1c-ca1d50b4595b is not able to process messages. The composite state is set to "off". The composite can be turned "on" by using the administrative consoles.</summary>
,detail=<detail><exception>Message Router for nstip/nstip_Pro_CoPiNotificationProcess!1.0*soa_084da522-a825-4aa6-9d1c-ca1d50b4595b is not able to process messages. The composite state is set to "off". The composite can be turned "on" by using the administrative consoles.</exception>
</detail>
,code=<code>env:Server</code>}
Activity:?Invoke1
Composite?Instance:?740332
Composite?Name:?TestBPELFaultPolicy
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth false
DEBUG SMTP: trying to connect to host "localhost", port 25, isSSL false
220 taisirsit.kacst.edu.sa ESMTP Sendmail 8.14.4+Sun/8.14.4; Fri, 12 Oct 2012 13:00:45 +0300 (AST)
DEBUG SMTP: connected to host "localhost", port: 25
EHLO taisirsit.kacst.edu.sa
250-taisirsit.kacst.edu.sa Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "EXPN", arg ""
DEBUG SMTP: Found extension "VERB", arg ""
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Found extension "SIZE", arg ""
DEBUG SMTP: Found extension "DSN", arg ""
DEBUG SMTP: Found extension "ETRN", arg ""
DEBUG SMTP: Found extension "DELIVERBY", arg ""
DEBUG SMTP: Found extension "HELP", arg ""
DEBUG SMTP: use8bit false
MAIL FROM:<[email protected]>
250 2.1.0 <[email protected]>... Sender ok
RCPT TO:<[email protected]>
250 2.1.5 <[email protected]>... Recipient ok
DEBUG SMTP: Verified Addresses
DEBUG SMTP: [email protected]
DATA
354 Enter mail, end with "." on a line by itself
From: [email protected]
To: [email protected]
Message-ID: <[email protected].sa>
Subject: SOA EXCEPTIONInstance #890381 of BPELProcess1
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Testing Email From Fault
BPEL Process Instance: 890381 needs intervention to recover from a technical exception: faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault}
messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage}
parts: {{
summary=<summary>Message Router for nstip/nstip_Pro_CoPiNotificationProcess!1.0*soa_084da522-a825-4aa6-9d1c-ca1d50b4595b is not able to process messages. The composite state is set to "off". The composite can be turned "on" by using the administrative consoles.</summary>
,detail=<detail><exception>Message Router for nstip/nstip_Pro_CoPiNotificationProcess!1.0*soa_084da522-a825-4aa6-9d1c-ca1d50b4595b is not able to process messages. The composite state is set to "off". The composite can be turned "on" by using the administrative consoles.</exception>
</detail>
,code=<code>env:Server</code>}
Check the Activities tab in the BPEL Management Console in order to resolve the error as soon as possible.
This message was automatically generated, please do not reply to it.
250 2.0.0 q9CA0j30012424 Message accepted for delivery
QUIT
221 2.0.0 taisirsit.kacst.edu.sa closing connection
Details from Instance of BPEL PROCESS :
Started invocation of operation "process" on partner "Service1".
Oct 12, 2012 10:00:45 AM [FAULT RECOVERY] Invoked handleBPELFault on custom java action class "com.kacst.fault.CustomFaultHandler".
Oct 12, 2012 10:00:45 AM Sending Email...
Oct 12, 2012 10:00:45 AM to Email [email protected]
Oct 12, 2012 10:00:45 AM to Email [email protected]
Oct 12, 2012 10:00:45 AM to Email getText...Testing Email From Fault BPEL Process Instance: 890381 needs intervention to recover from a technical exception: faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault} messageType: {{http://schemas.oracle.com/bpel/extension}RuntimeFaultMessage} parts: {{ summary=<summary>Message Router for nstip/nstip_Pro_CoPiNotificationProcess!1.0*soa_084da522-a825-4aa6-9d1c-ca1d50b4595b is not able to process messages. The composite state is set to "off". The composite can be turned "on" by using the administrative consoles.</summary> ,detail=<detail><exception>Message Router for nstip/nstip_Pro_CoPiNotificationProcess!1.0*soa_084da522-a825-4aa6-9d1c-ca1d50b4595b is not able to process messages. The composite state is set to "off". The composite can be turned "on" by using the administrative consoles.</exception> </detail> ,code=<code>env:Server</code>} . Check the Activities tab in the BPEL Management Console in order to resolve the error as soon as possible. This message was automatically generated, please do not reply to it.
Oct 12, 2012 10:00:45 AM to Email getHost...smtp.kacst.edu.sa
Oct 12, 2012 10:00:45 AM to Email getPort...25
Oct 12, 2012 10:00:45 AM to Email toAddresses2...
Oct 12, 2012 10:00:45 AM to Email [email protected]
Oct 12, 2012 10:00:45 AM to Email toAddresses3...
Oct 12, 2012 10:00:45 AM to Email [email protected]
Oct 12, 2012 10:00:45 AM to Email [email protected]
Oct 12, 2012 10:00:45 AM After Email...
Oct 12, 2012 10:00:45 AM [FAULT RECOVERY] Marked Invoke activity as "pending manual recovery".
Oct 12, 2012 10:00:45 AM Faulted while invoking operation "process" on provider "Service1".
Please suggest.
ThanksHi,
I got the solution. our email server is sending email to the mail accounts those are in the same domain but for different domains its not able to send the email.
you can try with the email those are created on the same email server.
Thanks
Tuku -
Sending mail to multiple adress
Hello friends,
i have written java code for sending mail,its working fine for single mail address. if we include multiple mail address its giving ERROR:" Illegal route-addr in string" , so friends if there is any solution for this problem: please kindly mailto: "[email protected] " i hae included sendmail->code and setproperty->
SENDMAIL
public boolean sendMail(User userObj, Message message, String content){
try{
util util=new util();
String arr[]=util.getTokens(userObj.email,",");
InternetAddress inetarr[]=new InternetAddress[arr.length];
for(int i=0;i<arr.length;i++){
inetarr=new InternetAddress(arr[i].toString());
message.setRecipients(Message.RecipientType.TO, inetarr);
MimeMultipart multipart=new MimeMultipart();
BodyPart msgBodyPart=new MimeBodyPart();
msgBodyPart.setContent(content, "text/html");
multipart.addBodyPart(msgBodyPart);
message.setContent(multipart);
message.setSentDate(new Date());
Transport.send(message);
return true;
}catch(Exception e){
e.printStackTrace();
return false;
}//End Of The Method
GETPROPRITIES
protected Properties getProperties(){
Properties props = new Properties();
props.put("mail.smtp.starttls.enable","true");
props.put("mail.transport.protocol", "smtp");
props.put("mail.smtp.host", adminObj.info.server[0]);
props.put("mail.smtp.port",adminObj.info.server_port[0]+"");
props.put("mail.debug","false");
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.quitwait", "false");
props.put("mail.smtp.sendpartial", "true");
return props;
}//End Of The MethodHi,
Thanks for your reply.I will avoid three don'ts in future postings.
Acctual error message as follows
javax.mail.internet.AddressException: Illegal route-addr in string ``saravana.07
@gmail.com,[email protected]''
at javax.mail.internet.InternetAddress.checkAddress(InternetAddress.java
:883)
at javax.mail.internet.InternetAddress.parse(InternetAddress.java:819)
at javax.mail.internet.InternetAddress.parseHeader(InternetAddress.java:
580)
at javax.mail.internet.MimeMessage.getAddressHeader(MimeMessage.java:680
at javax.mail.internet.MimeMessage.getFrom(MimeMessage.java:340)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:897)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:583)
at javax.mail.Transport.send0(Transport.java:169)
at javax.mail.Transport.send(Transport.java:98)
at common.application.utilities.TenderMail.sendMail(TenderMail.java:483)
at common.application.mail.send_user_mail.__BodhiReceive(send_user_mail.
java:146)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at jdbs.BodhiServer.callStation(Unknown Source)
at jdbs.BodhiSend.doSend(Unknown Source)
at common.application.mail.sendmail.__BodhiReceive(sendmail.java:361)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at JumpForwarder1.callStation(JumpForwarder1.java:863)
at JumpForwarder1.processRequest(JumpForwarder1.java:613)
at JumpForwarder1.authenticateUserAndExecute(JumpForwarder1.java:254)
at JumpForwarder1.doPost(JumpForwarder1.java:132)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:284)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:204)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:257)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
ContextValve.java:245)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:199)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:509)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:184)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:164)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:156)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:20
6)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:833)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:732)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:619)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:688)
at java.lang.Thread.run(Thread.java:534) -
Help !! How to use SmtpClient in an Applet?
Hi,
I have 2 TextFields and a button in an Applet. On click of the button, I wanted to get connected to an email server (e.g pop.mail.yahoo.com) and post my message using (smtp.mail.yahoo.com) to "[email protected]" . I tried this programme using both URL and Sockets. But in both cases I am getting "NullPointerException". Can any one help me with this problem by giving some source code?
Here is my code:
if (ae.getSource().equals(button1))
System.out.println("Clicked Send");
try
sendmail = new SmtpClient("smtp.mail.yahoo.com");
//sendmail = new SmtpClient("java.sun.com");
System.out.println("connecting......");
System.out.println("SendMail:" +sendmail);
sendmail.from(getString);
sendmail.to("mailto:[email protected]");
//sendmail.to("[email protected]");
ps = sendmail.startMessage();
System.out.println("PS :" +ps);
//succeed = true;
catch(Exception e)
//e.printStackTrace();
System.out.println("Couldn't reach you through javasoft, trying your local machine instead. You probably are behind a firewall.");
The source code has been provided, can any one help me?
Thanks
[email protected]well the answer is simple
"sendmail" object is NULL and ur trying to access the methods from it.
When u instantiate SmtpClient. It just creates a Object. it does not actually connect to the MailServer. u would probably need to luk into API and find out the appropriate method for connect......well i haven't myself luked into the API so i am not too sure about this
Manja -
Open mail -relay problem !
Hi,
My Internet/Mail server is Netra i with Solaris 2.5.1.
I received e-mail from mail-abuse org saying that my mail server is open for mail-relay.
How can I disable it ?
Thanks IvanHello there,
I believe that is true with sendmail 8.6 version which was shipped
with Solaris 5.5.1 or 5.6. You will need to apply the latest
5.5.1 sendmail patch (103594-19) which upgrades 5.5.1 sendmail
to be equivalent to sendmail 8.8.8+sun patches.
Unlike previous versions, sendmail 8.8 can be configured not to
pass on mail from one user outside the local domain to another in sendmail.cf
FYI, mconnect <your hostname> will show the current sendmail rev.
Hope this helps.
Hae
Sun Developer Technical Support -
Javax.mail.mailexception while am trying to send the mail
Hi.
Am trying to send a mail from ADF Application am using SMTP Server to send the mail
I have added javamail.jar in my libraries
This is the code am using to send
public String send() {
// Add event code here...
String to;
to = new String();
String host = "localhost";
String from = "[email protected]";
Properties properties = System.getProperties();
properties.setProperty("mail.smtp.host", host);
Session session = Session.getDefaultInstance(properties);
try{
MimeMessage message = new MimeMessage (session);
message.setFrom(new InternetAddress(from));
message.addRecipient(Message.RecipientType.TO,new InternetAddress("to"));
message.setSubject(subj);
message.setText(body);
Transport.send(message);
System.out.println ("Sent Message Successfully");
catch(MessagingException max){
max.printStackTrace();
return null;
}Am getting the exception as below
javax.mail.MessagingException: [EOF]
at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:1481)
at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1512)
at com.sun.mail.smtp.SMTPTransport.finishData(SMTPTransport.java:1321)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:637)
at javax.mail.Transport.send0(Transport.java:189)
at javax.mail.Transport.send(Transport.java:118)
at view.SendMail.send(SendMail.java:78)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(Unknown Source)
at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
Could any one pls help me?
regards,
Prasad K T.This question is better asked in a java forum or JavaMail forum {forum:id=975}
Timo
Maybe you are looking for
-
If project is on C, how do multiple authors share?
Hi all, I've been a lone author, and soon I will not be. We're going to be installing either RoboSource Control 3 or a third-party version control system in order for all four of us to access and work in the same help projects at the same time. Howev
-
Can anyone tell me which cable and which adapter I need to connect to a Panasonic TX37P plasma TV? The TV has HDMI ports? Cheers for any advice. Chris
-
Hello guys, Recently I've lost my iPad2 in the public. It was my own mistake to leave my iPad on the table and forget to hold it all the times in my hand. When I realized that I'm not holding my iPad after few minutes, it's gone from the table. I've
-
I turned off MMS today and suddenly all my text messages dissapeared from SMS 'inbox'. switched the iphone 4s on and off many times, nothing. If I search for an old text message by text I can see it, but it's not in the box of SMS
-
After downloading from the camera can I delete from the camera?
I'm using Bridge CS3 to download images from my Canon XTi Digital Rebel. After download I would like to delete the image from the camera's storage disk. I would like NOT to have to run the Canon's EOS utility to do this and would prefer doing it from