Error while sending a mail using UTP_MAIL package in Oracle 10g
Hi,
We are using UTP_MAIL package to send a mail from Oracle 10g.We have follwed the following steps ...
SQL> connect sys/password as sysdba
Connected.
SQL> @$ORACLE_HOME/rdbms/admin/utlmail.sql
Package created.
Synonym created.
SQL> @$ORACLE_HOME /rdbms/admin/prvtmail.plb
Package body created.
SQL > alter system set smtp_out_server = '<mail_server_ip:25>' scope =spfile;
System altered..
Now we try the code
begin
utl_mail.send(
sender => 'sender's mail',
recipients => 'receiver mail',
CC => 'optional',
subject => 'Testing utl_mail',
message => 'Test Mail'
end;
But we get the following error...
ERROR at line 1:
ORA-29278: SMTP transient error: 421 Service not available
ORA-06512: at "SYS.UTL_SMTP", line 21
ORA-06512: at "SYS.UTL_SMTP", line 97
ORA-06512: at "SYS.UTL_SMTP", line 139
ORA-06512: at "SYS.UTL_MAIL", line 405
ORA-06512: at "SYS.UTL_MAIL", line 594
ORA-06512: at line 2
We also tried connecting to the mail server through telnet .But it is not getting connected..
Please help us to solve the issue.
From your own posting you may have the clue, if you try to access your mail server through telnet and it is not successful, it means the service is down or there are networking issues.
On pre 10gR2 versions there was a bug 4083461.8. It could affect you if you are on 10gR1
"Bug 4083461 - UTL_SMTP.OPEN_CONNECTION in shared server fails with ORA-29278 Doc ID: Note:4083461.8"
This was fixed on 10gR2 base and on 9.2.0.8.0
~ Madrid
Similar Messages
-
Error while using UTP_MAIL package in oracle 10g
Hi,
I am using the UTP_MAIL package to send a mail from oracle 10g.
I hane connected to the database as sysdba,but while setting the SMTP_SERVER_OUTPUT parameter i get the following error.
SQL> ALTER SYSTEM SET smtp_out_server='blrkecmbx02.ad.abc.com:25' scope=both;
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified
Pls help to figure out a solution.This parameter is not modifiable, check the Oracle Reference: SMTP_OUT_SERVER Initialization Parameter
Try the scope=spfile instead of both.
~ Madrid -
Error while sending E-Mail -- 501 Syntax error in parameters or arguments
Dear Friends,
I was trying to send E-Mail using the NTLM Authentication mechanism using the below program:
import java.util.Properties;
import javax.mail.Message;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import javax.mail.PasswordAuthentication;
import java.util.Date;
import com.sun.mail.smtp.*;
public class MailerWithAuthentication
private String smtpServer;
private String fromEmailId;
private String toEmailId;
private String ccEmailId;
private String bccEmailId;
private String subject;
private String message;
private String host;
public MailerWithAuthentication(String toemail, String msg,String sub,String fromId,String host)
this.toEmailId = toemail;;
this.subject = sub;
this.message = msg;
this.fromEmailId=fromId;
this.host=host;
public void sendMail()
String mailContent = "";
try
Authenticator authenticator = new Authenticator();
Properties props = new Properties();
props.put("mail.smtp.host",this.host );
props.put("mail.smtp.port", "25");
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.auth.mechanisms", "NTLM");
props.put("mail.smtp.auth.ntlm.flags", "0x00000200");
props.put("mail.smtp.auth.ntlm.domain","sal.ad");
props.put("mail.debug", "true");
Session session = Session.getDefaultInstance(props,authenticator);
Message msg = new MimeMessage(session);
MimeMessage message = new MimeMessage(session);
message.setContent("This is a test", "text/plain");
message.setFrom(new InternetAddress(this.fromEmailId));
message.addRecipient(Message.RecipientType.TO,new InternetAddress(this.toEmailId));
Transport.send(message);
catch (Exception e)
e.printStackTrace();
System.out.println("Exception in MailerThread : run: " + e.getMessage());
private class Authenticator extends javax.mail.Authenticator {
private PasswordAuthentication authentication;
public Authenticator() {
String username= "sal.ad\mailuser";
String password = "mail@123";
authentication = new PasswordAuthentication(username, password);
protected PasswordAuthentication getPasswordAuthentication() {
return authentication;
public static void main(String args[])
try
System.out.println(" Usage : java MailerWithAuthentication <To-Email> <Message> <Subject> <From-Email> <Mail-Server-IP>");
MailerWithAuthentication mailer = new MailerWithAuthentication (args[0],args[1],args[2],args[3],args[4]);
mailer.sendMail();
catch(Exception e)
e.printStackTrace();
Following is the output while running the program:
DEBUG: JavaMail version 1.4ea
DEBUG: java.io.FileNotFoundException: /usr/java/jdk1.5.0_14/jre/lib/javamail.providers (No such file or directory)
DEBUG: !anyLoaded
DEBUG: not loading resource: /META-INF/javamail.providers
DEBUG: successfully loaded resource: /META-INF/javamail.default.providers
DEBUG: Tables of loaded providers
DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPSSLTransport=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPSSLStore=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3SSLStore=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]}
DEBUG: Providers Listed By Protocol: {imaps=javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], smtps=javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], pop3s=javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]}
DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map
DEBUG: !anyLoaded
DEBUG: not loading resource: /META-INF/javamail.address.map
DEBUG: java.io.FileNotFoundException: /usr/java/jdk1.5.0_14/jre/lib/javamail.address.map (No such file or directory)
Mechanishm = NTLM
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "192.168.14.6", port 25, isSSL false
220 ****************************************************************************
DEBUG SMTP: connected to host "192.168.14.6", port: 25
EHLO
501 Syntax error in parameters or arguments -
HELO
501 Syntax error in parameters or arguments -
javax.mail.MessagingException: 501 Syntax error in parameters or arguments -
=================================
The error is :
EHLO
501 Syntax error in parameters or arguments -
HELO
501 Syntax error in parameters or arguments -
=================================
Please tell me what went wrong here. Is it due to any mistake in the program ?
Thanks in advance.hello Anirudh Pucha,
thanks for your message,
i'm downloading all the files you advised and one more doubt regarding SOA installation,
i'm using BPEL Process manager 10.1.3.1.0 installed on my machine and not installed SOA Suite (problem in installing AS Middle tier), i send voice,sms through BPEL PM which works fine, and faced problem in e-mail notification only, according to me with out installing SOA suite we can use BPEL PM or please let me know the procedure to install the downloading files.
if possible please send me a details in word documents to my mail "[email protected]".
Thanks again -
Getting error when sending SMTP mail using javamail api
hi all
i am new to javamail api...and using it first-time....i'v used the following code
<%
String mailHost="mail.mastsale.com";
String mailText="Hello this is a test msg";
String to="<a href="mailto:[email protected]">[email protected]</a>";
String subject="jsp test mail";
try
String from="<a href="mailto:[email protected]">[email protected]</a>";
String mailhost = "mail.mastsale.com";
Properties props = System.getProperties();
props.put("mail.smtp.host", mailhost);
// Get a Session object
Authenticator auth = new SMTPAuthenticator( "<a href="mailto:[email protected]">[email protected]</a>", "abcd" );
Session session1 = Session.getInstance(props,auth);
//Session.setDebug(true);
//construct message
Message msg = new MimeMessage(session1);
msg.setFrom(new InternetAddress(from,"Your Name"));
msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(to, false));
msg.setSubject(subject);
msg.setText(mailText);
//msg.setHeader("X-Mailer",mailer);
msg.setSentDate(new Date());
msg.saveChanges();
//Send the message
out.println("Sending mail to " + to);
Transport.send(msg);
catch (MessagingException me)
out.println("Error in sending message for messaging exception:"+me);
%>
and
SMTPAuthenticator.java
import java.io.*;
import java.util.*;
import java.lang.*;
import javax.mail.*;
import javax.mail.internet.*;
public class SMTPAuthenticator extends javax.mail.Authenticator {
private String fUser;
private String fPassword;
public SMTPAuthenticator(String user, String password) {
fUser = user;
fPassword = password;
public PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(fUser, fPassword);
Now getting error as: Error in sending message for messaging exception:javax.mail.SendFailedException: Invalid Addresses; nested exception is: com.sun.mail.smtp.SMTPAddressFailedException: 550-(host.hostonwin.com) [208.101.41.106] is currently not permitted to relay 550-through this server. Perhaps you have not logged into the pop/imap server 550-in the last 30 minutes or do not have SMTP Authentication turned on in your 550 email client.
Can anyone help me?i got the following error while using the below code,
-----------registerForm----------------
DEBUG: setDebug: JavaMail version 1.3.2
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth true
:::::::::::::::::::::::::::::::::<FONT SIZE=4 COLOR="blue"> <B>Error : </B><BR><HR> <FONT SIZE=3 COLOR="black">javax.mail.AuthenticationFailedException<BR><HR>
-----------registerForm----------------
public class SendMailBean {
public String send(String p_from, String p_to, String p_cc, String p_bcc,
String p_subject, String p_message, String p_smtpServer,String FilePath) {
String l_result = "";
// Name of the Host machine where the SMTP server is running
String l_host = p_smtpServer;
//for file attachment
String filename = FilePath;
// Gets the System properties
Properties l_props = System.getProperties();
// Puts the SMTP server name to properties object
l_props.put("mail.smtp.host", l_host);
l_props.put("mail.smtp.auth", "true");
// Get the default Session using Properties Object
Session l_session = Session.getDefaultInstance(l_props, null);
l_session.setDebug(true); // Enable the debug mode
try {
MimeMessage l_msg = new MimeMessage(l_session); // Create a New message
l_msg.setFrom(new InternetAddress(p_from)); // Set the From address
// Setting the "To recipients" addresses
l_msg.setRecipients(Message.RecipientType.TO,
InternetAddress.parse(p_to, false));
// Setting the "Cc recipients" addresses
l_msg.setRecipients(Message.RecipientType.CC,
InternetAddress.parse(p_cc, false));
// Setting the "BCc recipients" addresses
l_msg.setRecipients(Message.RecipientType.BCC,
InternetAddress.parse(p_bcc, false));
l_msg.setSubject(p_subject); // Sets the Subject
// Create and fill the first message part
MimeBodyPart l_mbp = new MimeBodyPart();
//123
///////l_mbp.setText(p_message);
l_mbp.setContent(p_message,"text/html");
// Create the Multipart and its parts to it
Multipart l_mp = new MimeMultipart();
//l_mp.setContent(html,"text/html");
l_mp.addBodyPart(l_mbp);
// Add the Multipart to the message
l_msg.setContent(l_mp,"text/html");
// Set the Date: header
l_msg.setSentDate(new Date());
//added by cibijaybalan for file attachment
// attach the file to the message
//Multipart l_mp1 = new MimeMultipart();
if(!filename.equals(""))
String fname = filename;
MimeBodyPart mbp2 = new MimeBodyPart();
FileDataSource fds = new FileDataSource(fname);
mbp2.setDataHandler(new DataHandler(fds));
mbp2.setFileName(fds.getName());
l_mp.addBodyPart(mbp2);
// add the Multipart to the message
l_msg.setContent(l_mp);
//ends here
l_msg.setSentDate(new java.util.Date());
// Send the message
Transport.send(l_msg);
// If here, then message is successfully sent.
// Display Success message
l_result = l_result + "Mail was successfully sent to : "+p_to;
//if CCed then, add html for displaying info
//if (!p_cc.equals(""))
//l_result = l_result +"<FONT color=green><B>CCed To </B></FONT>: "+p_cc+"<BR>";
//if BCCed then, add html for displaying info
//if (!p_bcc.equals(""))
//l_result = l_result +"<FONT color=green><B>BCCed To </B></FONT>: "+p_bcc ;
//l_result = l_result+"<BR><HR>";
} catch (MessagingException mex) { // Trap the MessagingException Error
// If here, then error in sending Mail. Display Error message.
l_result = l_result + "<FONT SIZE=4 COLOR=\"blue\"> <B>Error : </B><BR><HR> "+
"<FONT SIZE=3 COLOR=\"black\">"+mex.toString()+"<BR><HR>";
} catch (Exception e) {
// If here, then error in sending Mail. Display Error message.
l_result = l_result + "<FONT SIZE=4 COLOR=\"blue\"> <B>Error : </B><BR><HR> "+
"<FONT SIZE=3 COLOR=\"black\">"+e.toString()+"<BR><HR>";
e.printStackTrace();
}//end catch block
//finally {
System.out.println(":::::::::::::::::::::::::::::::::"+l_result);
return l_result;
} // end of method send
} //end of bean
plz help me -
Error while sending E-Mail Notification
hi,
when i tried to send mail from BPEL i faced error, where i configured the outlook with gmail server its working fine,here i paste the ns-emails.xml and the error code is server.
ns_emails.xml
<EmailAccounts xmlns="http://xmlns.oracle.com/ias/pcbpel/NotificationService"
EmailMimeCharset=""
NotificationMode="ALL">
<EmailAccount>
<Name>Default</Name>
<GeneralSettings>
<FromName>my name</FromName>
<FromAddress>my email address</FromAddress>
</GeneralSettings>
<OutgoingServerSettings>
<SMTPHost>smtp.gmail.com</SMTPHost>
<SMTPPort>587</SMTPPort>
<AuthenticationRequired>true</AuthenticationRequired>
<UseTLS>true</UseTLS>
</OutgoingServerSettings>
<IncomingServerSettings>
<Server>pop.gmail.com</Server>
<Port>995</Port>
<Protocol>pop3</Protocol>
<UserName>my email address</UserName>
<Password ns0:encrypted="false" xmlns:ns0="http://xmlns.oracle.com/ias/pcbpel/NotificationService">my password</Password>
<UseSSL>true</UseSSL>
<Folder>Inbox</Folder>
<PollingFrequency>1</PollingFrequency>
<PostReadOperation>
<MarkAsRead/>
</PostReadOperation>
</IncomingServerSettings>
</EmailAccount>
</EmailAccounts>
Error in server:
javax.mail.MessagingException: 530 5.7.0 Must issue a STARTTLS
command first. a4sm326251tib.11
at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTran
sport.java:1020)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTranspor
t.java:716)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTrans
port.java:388)
at oracle.tip.pc.services.notification.email.EmailDriver
.sendMessage(EmailDriver.java:215)
at oracle.tip.pc.services.notification.email.EmailDriver
.send(EmailDriver.java:185)
at oracle.tip.pc.services.notification.DefaultNotificati
onServiceImpl.sendEmailNotification(DefaultNotificationServiceImpl.java:251)
at oracle.tip.pc.services.notification.NotificationServi
ceImpl.sendEmailNotification(NotificationServiceImpl.java:271)
at oracle.bpel.services.notification.queue.sender.MDBCon
sumer.deliverNotification(MDBConsumer.java:256)
at oracle.bpel.services.notification.queue.sender.MDBCon
sumer.onMessage(MDBConsumer.java:137)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native M
ethod)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMet
hodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Deleg
atingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.evermind.server.ejb.interceptor.joinpoint.EJBJoin
PointImpl.invoke(EJBJoinPointImpl.java:35)
at com.evermind.server.ejb.interceptor.InvocationContext
Impl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.DMSInterce
ptor.invoke(DMSInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContext
Impl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.SetContext
ActionInterceptor.invoke(SetContextActionInterceptor.java:44)
at com.evermind.server.ejb.interceptor.InvocationContext
Impl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.InvocationContextPool.invoke(
InvocationContextPool.java:55)
at com.evermind.server.ejb.MessageDrivenConsumer.onMessa
ge(MessageDrivenConsumer.java:347)
at com.evermind.server.ejb.MessageDrivenConsumer.process
Messages(MessageDrivenConsumer.java:233)
at com.evermind.server.ejb.MessageDrivenConsumer.run(Mes
sageDrivenConsumer.java:169)
at com.evermind.util.ReleasableResourcePooledExecutor$My
Worker.run(ReleasableResourcePooledExecutor.java:298)
at java.lang.Thread.run(Thread.java:595)
please help me out to resolve the issue.
thanks in Advance
Aswath Thanigahello Anirudh Pucha,
thanks for your message,
i'm downloading all the files you advised and one more doubt regarding SOA installation,
i'm using BPEL Process manager 10.1.3.1.0 installed on my machine and not installed SOA Suite (problem in installing AS Middle tier), i send voice,sms through BPEL PM which works fine, and faced problem in e-mail notification only, according to me with out installing SOA suite we can use BPEL PM or please let me know the procedure to install the downloading files.
if possible please send me a details in word documents to my mail "[email protected]".
Thanks again -
Error while sending the data using input schedule
Dear Friends,
I am unable to send the data using input schedule due to following error is occur while sending the data.
The Error Message : Member (H1) of dimension (ENTITY) is not a base member (parent or formula)
Can anyone please help me to resolve the above error.
Thanks and regards,
MD.Hi,
You are trying to send data to a parent/node, you can only send data in BPC to lowest-level children (base mamabers) of any dimension.
"H1" is a parent in the entity dimension so you should try sending to a child.
Tom. -
HTTP error while sending SOAP request using wsdl file
We created SOAP request using the wsdl file ; while sending SOAP request from Altova XMLSpy, we are getting the below error.
HTTP error: could not post file
Can you please explain how to resolve this issue
Regards,
Sanghamitrathere is very little information to help you here.
Can you confirm if this is a SOAP sender scenario or SOAP receiver scenario?
Also do go to thru these links to help you out;
Troubleshooting
Troubleshooting - RFC and SOAP scenarios *** Updated on 20/04/2009 ***
RFC -> SOAP
RFC -> XI -> WebService - A Complete Walkthrough (Part 1)
RFC -> XI -> WebService - A Complete Walkthrough (Part 2)
SOAP <-> XI <-> RFC/BAPI
Walkthrough - SOAP XI RFC/BAPI -
Error while sending a mail with pdf attachment
Hai
I am sending mail with an attachment of PDF document. While sending I am getting
javax.activation.UnsupportedDataTypeException: application/pdf
This is my code
public static void setByteArrayAsAttachment(Message msg, byte[] attach)
throws MessagingException {
MimeBodyPart p1 = new MimeBodyPart();
ByteArrayDataSource byteStr = new ByteArrayDataSource(attach,"application/pdf");
p1.setContent(byteStr,"application/pdf");
Multipart mp = new MimeMultipart();
mp.addBodyPart(p1);
msg.setContent(mp);
Can one one help me on this...
Thanks
Jithesh PMChange
p1.setContent(byteStr,"application/pdf");
to
p1.setDataHandler(new DataHandler(byteStr)); -
Error while migrating from ms access 2003 db to oracle 10g in sqldeveloper
Hello,
i am working on migration project from MS access 2003 to Oracle 10g on windows XP sp2 plateform using SQL developer.
it went quit smoothly till the "capture microsoft access" .so in this step the sql developer opens the access db in background... but while opening the file in background it gives error
Object library not registered i tried many workaround but of no use..
anybody's help in this regard would be well appreciated.
thanks.Hi,
Did you follow all the steps in the SQL*Developer documentation about preparing the Access database for migration -
Oracle® SQL Developer User’s Guide Release 3.0 -
2.2.4.3 Before Migrating From Microsoft Access
and -
Oracle® SQL Developer Supplementary Information for Microsoft Access Migrations Release 3.0
2.4 Preparing the Microsoft Access Database for Capture
The error also indicates there may be a problem with your Access installation so could you check that everything is okay with that ? I have found references that indicate a re-install of Office/Access will prevent the error.
Regards,
Mike -
Hi ALL,
I HAVE THE REQUIREMENT AS SEND A REPORT AS A MAIL. IAM USING FM 'SO_NEW_DOCUMENT_ATT_SEND_API1' WHILE EXECUTING ITS NOT SHOWING ANY ERROR. BUT IAM NOT GETTING ANY MAIL. I CHECKED IN 'SOST' TCODE. THERE I SEE A MESSAGE LIKE 'CANNOT PROCESS THE MSG TYPE IN SAP SYSTEM'. PLS TELL ME THE WHAT IS THE PROBLE.Hi
Please dont write in Capital letters, it considered as shouting. Hope you are aware of the forum rules.
You can check if you have made anything wrong in coding by referring wiki link.
[Sending Mails |http://wiki.sdn.sap.com/wiki/display/ABAP/SendingMails-HomePage]
Regards
Abhii -
Hello guys,
I am facing the error " Database error for <ADDR_PERS_COMP_COMM_GET> <0> " as a pop-up message.
below is my program.
types: BEGIN OF t_p0002,
pernr type PERSNO, "Personnel number
nachn TYPE PAD_NACHN, "Last Name
VORNA TYPE PAD_VORNA, "First Name
gbdat TYPE gbdat, "Date of Birth
END OF t_p0002.
*******************Data of an object which can be changed**************************************
data S_maildata type SODOCCHGI1.
*******************Text field length 255: texts***********************************************
data : IT_MAILTXT1 type table of SOLISTI1 , "Internal table will contain texts of mail header
WA_MAILTXT1 TYPE SOLISTI1,
IT_MAILTXT2 type table of SOLISTI1 , "Internal table will contain texts of contents in the mail
WA_MAILTXT2 TYPE SOLISTI1.
*******************Structure of the API Recipient List*****************************************
data : IT_MAILREC type table of SOMLRECI1,
WA_MAILREC TYPE SOMLRECI1.
DATA : it_pa0002 TYPE TABLE OF t_p0002,
wa_pa0002 type t_p0002.
data Header_text type c LENGTH 15.
CONSTANTS content_text type c LENGTH 35 VALUE 'Tomorrow is the birthday of'.
*******************Event start of selection***************************************************
start-of-selection.
PERFORM get_birthdate. " will give birthday details
PERFORM document_details. " will give text and mail details
*& Form get_birthdate
text : subroutine to get employee birthdate details
form get_birthdate.
data : l_date like sy-datum.
refresh it_pa0002.
l_date = sy-datum + 1.
SELECT pernr nachn vorna gbdat
from pa0002
INTO TABLE it_pa0002
where gbdat = '19650302'.
ENDFORM. "get_birthdate
*& Form document_details
text : subroutine to get texts and mail details.
FORM document_details.
CLEAR: Header_text,
wa_MAILREC.
REFRESH IT_MAILREC.
S_maildata-obj_name = 'Birthday Reminder'.
s_maildata-obj_descr = 'Birthday Reminder'.
s_maildata-obj_langu = sy-langu.
READ TABLE IT_MAILTXT1 INTO WA_MAILTXT1
WITH KEY WA_MAILTXT1-line .
WA_MAILTXT1-line = 'Birthday Reminder'.
append WA_MAILTXT1 TO IT_MAILTXT1.
CLEAR WA_MAILTXT1.
LOOP at it_pa0002 INTO wa_pa0002.
READ TABLE IT_MAILTXT2 INTO WA_MAILTXT2
WITH KEY WA_MAILTXT2-line .
CONCATENATE content_text ' ( ' wa_pa0002-pernr ' ) ' wa_pa0002-nachn wa_pa0002-vorna
INTO WA_MAILTXT2 SEPARATED BY ' '.
append WA_MAILTXT2 TO IT_MAILTXT2.
CLEAR WA_MAILTXT2.
CLEAR wa_pa0002.
ENDLOOP.
LOOP AT IT_MAILREC INTO WA_MAILREC.
WA_MAILREC-RECEIVER = 'Any mail id'.
WA_MAILREC-rec_type = 'U'.
append WA_MAILREC TO IT_MAILREC.
ENDLOOP.
********************Function Mofule:To Send new Document*****************************************
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
document_data = S_maildata
DOCUMENT_TYPE = 'RAW'
PUT_IN_OUTBOX = ' '
COMMIT_WORK = 'X'
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
tables
OBJECT_HEADER = IT_MAILTXT1
OBJECT_CONTENT = IT_MAILTXT2
CONTENTS_HEX =
OBJECT_PARA =
OBJECT_PARB =
receivers = IT_MAILREC
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8
IF sy-subrc = 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "document_details
After I pressed the exit button the program is getting terminated but still this mail is comming to sost transaction code.
If I will comment the message code which is after sy-subrc the popup will not come and program will work without any interruption.
Can anybody please solve this problem?Resolved
-
Terminated with error: REP-50152:Error while sending mail
Hi
Gets this error while sending report mails to external email id's
Terminated with error: REP-50152: Error while sending mail - Sending failed; nested exception is: javax.mail.SendFailedException: Invalid Addresses; nested exception is: javax.mail.SendFailedException: 550 5.7.1 Unable to relay for [email protected]
Any setting to be done in report config file?
thanks
MGIt should be like this
<pluginParam name="mailServer">%MAILSERVER_NAME%</pluginParam>
Specify the name of your mail server in the place of %MAILSERVER_NAME% above
Also make sure that this is not commented out.
Thanks, -
Sending e-mail using utl_smtp on oracle 9i
Hello
I have problem with sending e-mails using utl_smtp package.
My code looks like this:
lv_mail_conn := utl_smtp.open_connection(lv_mailhost_txt);
utl_smtp.ehlo(lv_mail_conn, lv_mailhost_txt);
res := utl_smtp.command(lv_mail_conn, 'AUTH LOGIN');
res := utl_smtp.command(lv_mail_conn, <login in base64>);
res := utl_smtp.command(lv_mail_conn, <password in base64>);
And I get en error after sending a password to SMTP server.
Error code: 535, text: 5.7.3 Authentication unsuccessful.
This happens on oracle 9i.
I have another server for testing which has oracle 10g installed. This code works fine on oracle 10g but doesn't work on oracle 9i.
Do you have any ideas what's wrong? I assume that SMTP server (microsoft exchange) work correctlys because I can send e-mail from test server.Ok problem solved :)
Problem was between oracle and MS exchange server. Live server oracle 9i is on linux, and testing server works on windows.
So the problem was with configuration. Our admins corrected it and now works :). I don't know details. -
Information Broadcast Error while sending as PDF format
Dear Team
I am getting the following error while sending a mail in PDF format using at Query Level.
Error: com.sap.ip.bi.base.exception.BIBaseRuntimeException
Notification Number RSBOLAP 014
If anybody faced this problem pls reply.
Best Regards,
SGHi,
Please check out teh SDN string below. There are couple of notes mentioned which might be helpful. Let us know the result.
Web Designer -> Java System Error RSBOLAP 018
Regards
Pankaj -
I'm getting an exception while sending a mail . .
i'm get an excpetion while sending a mail, example i'm getting
this particular error
Exception in thread "main" java.lang.NoClassDefFoundError: javax/activation/DataSource
at MailTest.<init>(MailTest.java:25)
at MailTest.main(MailTest.java:42)
this is my code
pls help me out
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Properties;
import javax.mail.*;
import javax.mail.internet.*;
import javax.naming.Context;
import javax.naming.InitialContext;
public class MailTest
String mailHost = "mail.business-functions.com";
String to = "[email protected]";
String from = "[email protected]";
String subject = "This is Test Mail Thru Java Mail API";
String body = "This is Test Mail to check whether the Java Mail APi is Working or not. This is prototype developed by Snehal K gandhi of Business Functions Software Solutions Pvt Ltd.";
Provider provider;
public MailTest()
try
Properties props = System.getProperties();
props.put("mail.smtp.host", mailHost);
Session session = Session.getInstance(props,null);
Message message = new MimeMessage(session);
message.setFrom(new InternetAddress(from));
message.setRecipients(Message.RecipientType.TO,new InternetAddress[]{new InternetAddress(to)});
message.setSubject(subject);
message.setContent(body, "text/plain");
Transport.send(message);
System.out.println("Mail has been Sent");
catch(MessagingException me)
System.out.println("2. Error While Sending the Mail and the exception is : " + me.toString());
public static void main(String arg[])
new MailTest();
***********************************************************************/<sigh>
You need activation.jar in your classpath and or
import javax.activation.*;
See the JavaMail Readme for more info.
If you haven't got JAF get it here
http://java.sun.com/products/javabeans/glasgow/jaf.html
Rgds,
SH
Maybe you are looking for
-
How to use the Rectangle class to draw an image and center it in a JPanel
I sent an earlier post on how to center an image in a JPanel using the Rectangle class. I was asked to send an executable code which will show the malfunction. The code below is an executable code and a small part of a very big project. To simplifiy
-
How do I find out the size of a file, trying to make a DVD and told the fil
Made a slide show project with music and trying to write to dvd. Computer tells me the file is to large and to use a dual sided disk. I cut may slides out but no luck. How do you find out the file size?
-
Itunes corrupt version error message. tried to re-download itunes and same error message
My itunes gives me an error message saying "This copy of iTunes is corrupted or is not installed correctly. Please reinstall iTunes" I tried to download from their site, and when i try to install it, it says "thank you for downloading iTunes" but it
-
Sql Server Agent: job hasn't run once today. Scheduling problem?
I created this job yesterday at about 4PM; the view history shows that it last ran successfully at 11:53PM. These are the settings I put: Schedule Type: Recurring Occurs: Daily Recurs every: 1 days(s) Occurs every: 5 minute(s) Starting at: 05:00:00 P
-
Dear ladies and gentlemen, I was asked to create an interface that would "hire employee" and I failed to find nice function module that would do that. Could you, please, share your ideas/experience about how to solve this? Best regards Momkic Message