Error in code in email notification sending

Hi,
I am using below code but not email is being send by this?
Please Suggest the email id not being send and sy-subrc is retruned as 8?
please check on the below code it can be tested also as it is synt correct
Tables : zcustemail.
Declarations.
*PARAMETERS: p_email(50) LOWER CASE.
DATA: document_data LIKE sodocchgi1.
DATA: t_content     LIKE STANDARD TABLE OF solisti1.
DATA: s_content     LIKE solisti1.
DATA: t_receivers   LIKE STANDARD TABLE OF somlreci1.
DATA: s_receivers   LIKE somlreci1. "occurs 0 with header line.
DATA : begin of it_email,
       email_id like zcustemail-email_id,
       end of it_email.
DAta: wa_itreceivers like it_email.
data : it_receivers  like it_email occurs 0 with header line.
*START-OF-SELECTION.
select email_id from zcustemail into table it_receivers.
loop at it_receivers into wa_itreceivers.
Receivers.    " add your receivers here..
  s_receivers-receiver = wa_itreceivers-email_id.
  s_receivers-rec_type = 'U'.
  s_receivers-express  = 'X'.
  APPEND s_receivers TO t_receivers.
endloop.
*LOOP AT et_mailid.
*CLEAR i_receivers.
*i_receivers-receiver = et_mailid-email_id.
*i_receivers-rec_type = 'U'.
*i_receivers-com_type = 'INT'.
*i_receivers-notif_del = 'X'.
*i_receivers-notif_ndel = 'X'.
*APPEND i_receivers.
*ENDLOOP.
Subject
  document_data-obj_descr = 'New mail from Sap'.
Body
  s_content  = 'Hi,'.
  APPEND s_content TO t_content.
  CLEAR: s_content.
  APPEND s_content TO t_content.
  s_content = 'Test email from sap, please don''t reply to this email'.
  APPEND s_content TO t_content.
  CLEAR: s_content.
  APPEND s_content TO t_content.
  s_content = 'Thanks,'.
  APPEND s_content TO t_content.
  s_content = 'Naren.'.
  APPEND s_content TO t_content.
Send the email.
  CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
       EXPORTING
            document_data              = document_data
       TABLES
            object_content             = t_content
            receivers                  = t_receivers
            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 e208(00) WITH 'Error in sending email :-(('.
  ELSE.
    MESSAGE s208(00) WITH 'Email sent )'.
  ENDIF.
  SUBMIT rsconn01 WITH mode = 'INT' AND RETURN.
regards
Nishant

Hi Nishant,
I tried the code written below and it is working absolutely fine for me. Why don't you try the FM 'SO_NEW_DOCUMENT_ATT_SEND_API1'. it is working correctly woth no error
DATA: g_sent_all(1) TYPE c,
          g_doc_data LIKE sodocchgi1,
          g_error TYPE sy-subrc.
DATA:  t_content      LIKE solisti1   OCCURS 0 WITH HEADER LINE,
       s_content    LIKE solisti1,
       i_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
       i_receivers    LIKE somlreci1  OCCURS 0 WITH HEADER LINE.
DATA : BEGIN OF it_receivers OCCURS 0,
          email_id TYPE so_recname,
       END OF it_receivers.
CONSTANTS: c_tab     TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.
*START-OF-SELECTION.
SELECT email_id FROM zcustemail INTO TABLE it_receivers.
Add the recipients email address
LOOP AT it_receivers.
  CLEAR i_receivers.
  i_receivers-receiver = it_receivers-email_id.
  i_receivers-rec_type = 'U'.
  i_receivers-com_type   = 'INT'.
  i_receivers-notif_del  = 'X'.
  i_receivers-notif_ndel = 'X'.
  APPEND i_receivers.
ENDLOOP.
Fill the document data.
g_doc_data-doc_size = 1.
Populate the subject/generic message attributes
g_doc_data-obj_langu = sy-langu.
g_doc_data-obj_name  = 'SAPRPT'.
g_doc_data-obj_descr = 'New mail from SAP' .
g_doc_data-sensitivty = 'F'.
Describe the body of the message
Information about structure of data tables
CLEAR i_packing_list.
REFRESH i_packing_list.
i_packing_list-transf_bin = space.
i_packing_list-head_start = 1.
i_packing_list-head_num = 0.
i_packing_list-body_start = 1.
DESCRIBE TABLE t_content LINES i_packing_list-body_num.
i_packing_list-doc_type = 'RAW'.
APPEND i_packing_list.
Body
s_content = 'Hi,'.
APPEND s_content TO t_content.
CLEAR: s_content.
APPEND s_content TO t_content.
s_content = 'Test email from sap, please don''t reply to this email'.
APPEND s_content TO t_content.
CLEAR: s_content.
APPEND s_content TO t_content.
s_content = 'Thanks,'.
APPEND s_content TO t_content.
s_content = 'Naren.'.
APPEND s_content TO t_content.
Call the FM to post the message to SAPMAIL
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
  EXPORTING
    document_data              = g_doc_data
    put_in_outbox              = 'X'
    commit_work                = 'X'
  IMPORTING
    sent_to_all                = g_sent_all
  TABLES
    packing_list               = i_packing_list
    contents_txt               = t_content
    receivers                  = i_receivers
  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.
Store function module return code
g_error = sy-subrc.
Get i_receivers return code
LOOP AT i_receivers.
ENDLOOP.
*Instructs mail send program for SAPCONNECT to send email(rsconn01)
IF g_error EQ 0.
  SUBMIT rsconn01 WITH mode = 'INT'
                WITH output = 'X'
                AND RETURN.
ENDIF.
Hope it helps,
Regards,
Amit

Similar Messages

  • SAP BPC 10.0 Netweaver : Workstatus email notification sender is the User how to change it ?

    Hi Gurus,
    I've just set up email notification for Workstatus. I works fine but I've noticed something that won't be accepted by my customer :
    I Had created a BPC Service User SMAIL to send email notification. But it is useless since the email notification sender is always the user who actually made the workstatus change.
    This is very strange because this means that SAP can send emails IN NAME of Users. By default the email used is the user's email set up in SU01 and if the user has no email the sender mail adresse is : USERID@DEFAULTHOST
    Default domain defined in SCOT transaction for SAPCONNECT.
    I think that this situation raises a security breach ; to my opinion SAP should not be able to send emails in the name of users.
    Do you have any idea to change this situation in order to make all notification emails send by one unique System User as BPCSERVICEMAIL for instance.
    Thanks in advance for you help.
    Vincent.

    Hi JW,
    The answer to your question #2 is that we won't have SSIS packages in BPC7NW since all SQL server based functionality won't be there in Netweaver version. If you use migration tools to migrate from BPC5.x to BPC7NW, it can convert SSIS packages. However any custom SSIS code would have to be converted manually. For more information, please read Ryan's blog at SAP's definitive strategy for planning technologies moving forward: What's the word on BPC, BI-IP and SRC?
    Regards
    Pravin

  • Email notification sending problem

    Anyone can help me regarding my email notification sending.
    I have a program developed in netbeans which sends an email notification. Using the jar file generated when building/compiling the program, i created a batch file to run the jar. When i tried transferring the jar file to another pc, the program runs but the email sending does not. Im wondering which i need to check on for the file to run in another pc.

    What are the symptoms of 'email sending does not'?
    Have you access to the mail server on this second machine?

  • Enter Email Notification Sender

    Hi ppl,
    in CUP (AC 5.3 Compliant User Provisioning (AE)), when configuring the SMTP server for Email notifications (Configuration -> Workflow -> SMTP Server), there is a check box for "Enter Email Notification Sender".  When you click this, a text box opens for entry of an email address (System Email ID).
    Do you know what the purpose of this field is?
    Many thanks,
    Babak

    Hi Babak,
       This was added in AC 5.3 SP2 or SP3. When CUP sends emails out, the From field in the email used to be last approver or requestor's name. This can create confusion among the receiver of the email.
    To remove this confusion, SAP added this field. Whichever email id you configure in this textbox would show up in the From field of the emails going out through CUP.
    Regards,
    Alpesh

  • Email Notification send from previous setting although it has been deleted.

    Hello,
    Current monitoring schedule for Daily Monitor Open Item (Vendor) are 3 times a day at 1700, 1730 and 1800. However, we receive a notification for this monitoring activity at 0600 with a differents in (1) email header, (2) Monitoring ID and (3) Email Description.
    (1) Email Header:
    a) Normal notification has a header like below:
    Solution number.....SOL/0020203551/0021324570_0020203551
    Solution name.......BPM - PER
    Business Process....Daily Monitoring
    Step................Monitor AP Open Items
    System..............PER
    Monitoring Object...Open Items (Vendors)
    Monitoring ID.......000002736757000
    b) The notification we received at 0600 has header like below:
    Solution number.....SOL/0020203551/0021324570_0020203551
    Solution name.......BPM - PER
    Business Process....0000000662
    XXX.................0000000674
    System..............PER
    Monitoring Object...0000000719
    Monitoring ID.......000002563457000
    (2) Monitoring ID
    a) Monitoring ID from our setting at 1700, 1730 & 1800 is 000002736757000
    b) Monitoring ID from email at 0600 is 000002563457000
    (3) Email Description
    Email description from email at 0600 is an old email format. We have no longer using that email format for all of our monitoring activities.
    We double check this issue at Scheduling Overview and every day it is expected Collector Runs at 0600 even weu2019re not scheduling this session.
    We already deactivate and delete the current setting. Then do the setting again for Daily Monitor Open Item (Vendor). But still the notification is still there.
    Please advice on how to disable the unwanted email notification.
    Thanks

    I have discovered this site which claims the ability to do what you might want. I have no personal experience of it!
    http://www.icopybot.com/itunes-backup-manager.htm

  • Since upgrade to iOS 7 Email error on over 100KB emails "Cannot Send Mail  The message was rejected by the server because it is too large." Connecting to Exchange via Activesync

    Hi,
    Following the upgrade to iOS 7.0.3 on all our iPhone and iPad devices, it has been identified that when sending emails around 100KB in size and over an error message appears on the device stating “Cannot Send Mail  The message was rejected by the server because it is too large.” See error message below. The send/receive limit is over 10MB so this is not the issue.
    We are in an Exchange Environment using Microsoft Activesync. This issue is not evident in iOS 6. This has been tested on an iPhone 3GS running version iOS 6.1.3. We have been unable to repeat the issues seen on iOS 7 on the older OS. It is not possible to roll back to the older operating system as Apple are no longer signing the software.
    We use Microsoft Active Sync to connect to our Exchange servers through a TMG. The issue is very inconsistent, some identical emails go through, some fail. This is not an issue with the send/receive limit as this is over 10MB. The error message when it fails on the TMG is Status: 413 Request Entity Too Large, which we believe is from IIS on the CAS server.
    Does anyone have any suggest course of actions to take?
    Many Thanks

    This resolution have to attend at the server not with the ios device. My employer's mail administrator reject me to correct it from the server. As his concern is, if ither ios devices works why don't mine? So I am helpless than changing my iphone. It works fine for early versions of ios and with androids. And also one of my friends iphone4 with ios 7 (similar as mine) works too. So I guess it's something wrong with my iPhones settings. But basic question I cannot understand is it works in my phone before this ios7 upgrading. And currently working with my yahoo account too. Favourable reply expected.

  • Email notification sending to "w"?

    Running the 10.5.1 update fixed the problem I was having with notification emails not being sent, but now what happens is that Mail immediately pops up a message saying it can't send the message. When I checked, it was trying to send it to the proper address, but also to "w". There is no W that I see listed in iCal for the notification, and nothing spurious in the Me card in Address Book that I see.
    Any thoughts?

    What are the symptoms of 'email sending does not'?
    Have you access to the mail server on this second machine?

  • Error when composing new email to send "This message cannot be saved" -?

    Just upgraded to Tiger 10.4.6 and finally got my email working except for some reason every time I compose a new email, I get an error pop up stating "this message cannot be saved" -what is it talking about???

    Yes, if this is an AOL account, that was the problem.
    AOL doesn’t let mail clients create mailboxes at the root level of the account directory on the server. If you have Store draft messages on the server enabled, Mail tries to save the draft on the server, but fails to do so because AOL doesn’t let Mail create the Drafts mailbox there.
    Actually, you should turn OFF Store messages on the server for all the mailboxes in Preferences > Accounts > Mailbox Behaviors, so that those mailboxes are stored locally instead.

  • Email notification for user created through reconciliation in OIM

    Hi..
    I have done the following configurations for email notification when user is created through reconciliation in OIM
    Configuring IT Resource     
    Name     Email Server
         Type      Mail Server
         Authentication     FALSE
         Server Name     *.*.*.*
         Username     
         Password     
    Creating email definition with the following values     
    Name     Create User Email Notification
         Type     Provisioning Related
         Language     en
         Region     US
         Object Name     Xellerate User
         Process name     Xellerate User
         From     User
         User Login     Xelsysadm
         Subject      User Created
    Add Email notification in a new process task with name Notify     
    Process definition     Xellerate User
         Task     Notify
         Disable Manual Insert     Enable
         Required for Completion     Enable
         Allow Cancellation while Pending     Enable
         Handler Name     tcComplete Task
         Assignment Rule     Default
         Target Type     User
         User     Xelsysadm
         Email name     Create User Email Notification
         Send Email     Enable
         Notification Assignee     Enable
         Email      Create User Email Notification
         Status     Completed
    Xelsysadm has a valid email id. Now when I am reconciling any user, two mail notifications are being sent. Not able to know from where these two notifications are being triggered.
    Am i suppose to make any changes in the configurations?
    Edited by: Amruta Agarwal on Sep 28, 2011 4:21 AM

    Sorry re-read your issue again. I believe there are two notifications because you have added your notify task in the process definition and OIM OOTB sends a notification when a user is recon'd. Thus remove your task or disable the OOTB notification. The property is Recon.SEND_NOTIFICATION
    HTH,
    BB
    Edited by: bbagaria on Oct 7, 2011 9:13 AM

  • TS1424 while connecting to itunes error occuring code 11556

    while connecting to itunes error occuring code 11556 so plz send details to rectfy

    Hello Negaz
    When you uninstalled iTunes, did you uninstall it by using the article below or just uninstalled iTunes? The best practice is to remove not only iTunes, but also other associating software in the order that the first article give. If that does not work, then check out the second article for more troubleshooting options for connecting your iPhone to your computer.
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
    http://support.apple.com/kb/ht1923
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/ts1538
    Regards,
    -Norm G.

  • Oracle Scheduling Sending Email Notifications of Job Errors

    Hi,
    We are Oracle E-Business Suite - 12.1.3 & DB 11gr1
    I want to send to configure - Oracle Scheduling Sending Email Notifications of Job Errors.
    I already created job.. how i can configure Email Notifications of Job Errors.
    Thanks
    KSV.DBA

    Duplicate posts?
    Email Notofication - scheduled job fails
    Email Notification - Oracle Scheduled job failed
    Scheduler - 11g
    Re: Create Job scheduler

  • Send email notification when a concurrent request completes with Error

    {color:#0000ff}I need to setup the system such that when a concurrent request completes with the status "Error", generate/send email notification to an application user. Please advice if you know how to configure the system to accomplish this.
    Note: If the concurrent request completes with status "Normal" or "Warning", do not send/generate email notification to the application user.
    Thanks.
    {color}

    We do what amOx does. I made a concurrent program that calls a sql script, and emails me of errored jobs. It is more convenient than logging in each day. I ran this twice daily, and the sql checks for the previous 12 hour time slice (ie - twice a day run).
    ..colin

  • Cannot Send Email Notification Using Stored Procedure.

    Hi Friends,
    I tried to execute this job scheduler...
    begin
    dbms_scheduler.create_job(
    job_name => 'ILMS_JOB_SCHEDULE'
    ,job_type => 'PLSQL_BLOCK'
    ,job_action => 'begin ilms.check_reminder(); end; '
    ,start_date => SYSTIMESTAMP
    ,repeat_interval => 'FREQ=DAILY'
    ,enabled => TRUE
         ,end_date => NULL
    ,comments => 'Ilms job schedule for notification.');
    end;
    However, since the effect is too long I rescheduled the frequency to be every one minute in this set attribute...
    BEGIN
    DBMS_SCHEDULER.SET_ATTRIBUTE(
              name => 'ILMS_JOB_SCHEDULE'
              ,attribute => 'repeat_interval'
              ,value => 'FREQ=MINUTELY;INTERVAL=1'
    DBMS_SCHEDULER.DISABLE('ILMS_JOB_SCHEDULE');
    DBMS_SCHEDULER.ENABLE('ILMS_JOB_SCHEDULE');
    END;
    Check Reminder is the stored procedure invoked by job scheduler to check values in database columns before sending email notification to the respective recipients' email address and also the format of the email notification to be sent to the recipients...
    CREATE OR REPLACE PROCEDURE check_reminder AS
    NO number;
    CURSOR emp_cur is
    select * from pergerakan_ks where TASK_FLAG=7 and TASK_STATUS='InProgress';
    emp_rec emp_cur%rowtype;
    email_to varchar2(200);
    default_email varchar2(200);
    mesg varchar2(4000);
    no_kes varchar2(100);
    subj varchar2(4000);
    kpi number;
    crlf VARCHAR2( 2 ):= CHR( 13 ) || CHR( 10 );
    BEGIN
    default_email:='@abc.com.my';
    FOR emp_rec in emp_cur
    LOOP
    if emp_rec.PKS_TKH_TERIMA is null then
    dbms_output.put_line('count day ' || round(sysdate - to_date(emp_rec.pks_tkh_hantar)) || crlf || crlf);
    if round(sysdate - to_date(emp_rec.pks_tkh_hantar)) >3 then
    email_to:=emp_rec.pks_penghantar_id||default_email;
    select b.KS_BIL_NO into no_kes from kertas_siasatan b where b.KS_ID = emp_rec.pks_ks_id;
    subj:='Reminder untuk Membuat Tindakan Bagi No Kes '||no_kes;
    mesg:='Reminder untuk Membuat Tindakan Bagi No Kes '||no_kes;
    dbms_output.put_line('Sending email to ' || email_to || ' subject: ' || subj);
    dbms_output.put_line('update old pergerakan pks_id : '||emp_rec.pks_id);
    update pergerakan_ks set task_status='Done' where pks_id=emp_rec.pks_id;
    dbms_output.put_line('insert new pergerakan ks : ');
    insert into pergerakan_ks(pks_id,pks_ks_id,pks_km_id,pks_penghantar_id,pks_tkh_hantar,
    pks_penerima_id,pks_tkh_terima,task_name,task_owner,task_status,task_flag,fb_id)
    values(pks_id_seq.nextval,emp_rec.pks_ks_id,emp_rec.pks_km_id,
    emp_rec.pks_penghantar_id,sysdate,
    null,
    null,emp_rec.task_name,
    emp_rec.pks_penghantar_id,
    'InProgress',6,emp_rec.fb_id);
    commit;
    e_mail_message(email_to,email_to,subj,mesg);
    end if;
    end if;
    if emp_rec.PKS_TKH_TERIMA is not null then
    dbms_output.put_line('emp_rec.pks_km_id ' || emp_rec.pks_km_id || crlf);
    select c.KM_KPI into kpi from keluar_masuk_ks c where c.KM_ID = emp_rec.pks_km_id;
    no := round(sysdate - to_date(emp_rec.pks_tkh_terima))-kpi;
    dbms_output.put_line('count day - kpi' || no || crlf);
    dbms_output.put_line('kpi ' || kpi || crlf);
    if no = 1 then
    email_to:=emp_rec.pks_penghantar_id||default_email;
    select b.KS_BIL_NO into no_kes from kertas_siasatan b where b.KS_ID = emp_rec.pks_ks_id;
    subj:='Reminder untuk Membuat Tindakan Bagi No Kes '||no_kes;
    mesg:='Reminder untuk Membuat Tindakan Bagi No Kes '||no_kes;
    dbms_output.put_line('Sending email to ' || email_to || ' subject: ' || subj);
    email_to:=emp_rec.task_owner||default_email;
    subj:='Reminder untuk Membuat Tindakan Bagi No Kes '||no_kes;
    mesg:='Reminder untuk Membuat Tindakan Bagi No Kes '||no_kes;
    dbms_output.put_line('Sending email to ' || email_to || ' subject: ' || subj);
    e_mail_message(email_to,email_to,subj,mesg);
    e_mail_message(email_to,email_to,subj,mesg);
    end if;
    if no = 3 then
    select b.KS_BIL_NO into no_kes from kertas_siasatan b where b.KS_ID = emp_rec.pks_ks_id;
    email_to:=emp_rec.task_owner||default_email;
    subj:='Reminder untuk Membuat Tindakan Bagi No Kes '||no_kes;
    mesg:='Reminder untuk Membuat Tindakan Bagi No Kes '||no_kes;
    dbms_output.put_line('Sending email to ' || email_to || ' subject: ' || subj);
    e_mail_message(email_to,email_to,subj,mesg);
    end if;
    end if;
    END LOOP;
    END;
    E_mail_message is the stored procedure invoked by the check_reminder to tell scheduler information of the connection and the email address of the recipients...
    CREATE OR REPLACE procedure
    e_mail_message
    from_name in varchar2,
    to_name in varchar2,
    subject in varchar2,
    message in varchar2
    is
    l_mailhost VARCHAR2(64);
    l_from VARCHAR2(64);
    l_to VARCHAR2(64);
    crlf VARCHAR2( 2 ):= CHR( 13 ) || CHR( 10 );
    l_mail_conn UTL_SMTP.connection;
    mesg VARCHAR2( 4000 );
    BEGIN
    select a.SERVER into l_mailhost from email_setting a where a.SERVER is not null;
    select a.USERNAME into l_from from email_setting a where a.SERVER is not null;
    --UTL_SMTP.open_data(l_mail_conn);
    mesg:= 'Date: ' || TO_CHAR( SYSDATE, 'dd Mon yy hh24:mi:ss' ) || crlf ||
    'From: <'||l_from||'>' || crlf ||
    'Subject: ' ||subject|| crlf ||
    'To: '||to_name || crlf || '' || crlf ;
    mesg:=mesg||message;
    l_mail_conn := UTL_SMTP.open_connection(l_mailhost, 25);
    UTL_SMTP.helo(l_mail_conn, l_mailhost);
    UTL_SMTP.mail(l_mail_conn, l_from);
    UTL_SMTP.rcpt(l_mail_conn, to_name);
    UTL_SMTP.data(l_mail_conn, mesg);
    UTL_SMTP.quit(l_mail_conn);
    END;
    I tried to execute to execute the e_mail_message procedure but received this error. Also, no notification sent to the email address...
    ORA-29279: SMTP permanent error: 501 5.1.3 Invalid address
    ORA-06512: at "SYS.UTL_SMTP", line 21
    ORA-06512: at "SYS.UTL_SMTP", line 99
    ORA-06512: at "SYS.UTL_SMTP", line 241
    ORA-06512: at "ILMS.E_MAIL_MESSAGE", line 33
    ORA-06512: at line 13
    Please help so that I can receive the email notification into my email...thanks in advance for your time..

    user13281540 wrote:
    ORA-29279: SMTP permanent error: 501 5.1.3 Invalid address
    ORA-06512: at "SYS.UTL_SMTP", line 21
    ORA-06512: at "SYS.UTL_SMTP", line 99
    ORA-06512: at "SYS.UTL_SMTP", line 241
    ORA-06512: at "ILMS.E_MAIL_MESSAGE", line 33
    ORA-06512: at line 13This is not an Oracle error - this is the mail server saying "+hey, I don't like that e-mail address you are supplying, I'm not accepting it!+".
    If you look at RFC821 (Request For Comments memo 821 describes the SMTP specifications), you'll see that the sender and recipient needs to be supplied in the format +<[email protected]>+, e.g. +<[email protected]>+.
    I have found that not all SMTP servers are equal in this regard. Some may insist on the brackets around the address, some may not.
    You need to confirm the format of the addresses you use in the "+MAIL FROM+" and "+RCPT TO+" commands.. and ensure that these formats are accepted by your SMTP server - and if not, change your code to use an acceptable format.
    The easiest way to do this is using telnet - and interacting directly and manually with the server. SMTP is a clear text protocol and easy to use manually. Try it. It is the best way to test SMTP interaction and validate the approach and SMTP commands and arguments used by your code.

  • Email Notification - ERROR: 530 5.7.1 Client was not authenticated

    Hi People!
    I am receiving the follows error when I run scheduled task. Also, I used Javamail and I have the same problem. The problem: MAIL FROM isn´t authenticating. How can I solve it?
    Other question: How can I configure Email Notification in debug?
    Thanks!
    API Code (Schedule task)
    this.dataProvider = getDataBase();
    tcEmailNotificationUtil emaildef = new tcEmailNotificationUtil(dataProvider);
    emaildef.setSubject("User: " + s2);
    emaildef.setFromAddress(fromaddr);
    emaildef.setBody("OIM has detected a modify in Active Directory. " );
    emaildef.sendEmail(toaddr);
    System Configuration->XL.MailServer=Email Server
    IT Resource 'Email server'
    Name Email Server
    Auth : true
    Server name : exchange server name
    User name : <domain name>\User name
    Password :: Password of that user
    ERROR
    ERROR,11 Jan 2011 18:18:00,375,[XELLERATE.REQUESTS],Class/Method: tcEmailNotificationUtil/sendEmail encounter some problems: 530 5.7.1 Client was not authenticated
    com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.1 Client was not authenticated
    at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1388)
    at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:959)
    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 com.thortech.xl.dataobj.util.tcEmailNotificationUtil.sendEmail(Unknown Source)
    at com.thortech.xl.schedule.tasks.ActiveDirectoryReconTask.processUserChange(ActiveDirectoryReconTask.java:657)
    at com.thortech.xl.schedule.tasks.ActiveDirectoryReconTask.processBatch(ActiveDirectoryReconTask.java:341)
    at com.thortech.xl.integration.ActiveDirectory.tcADUtilLDAPController.searchResultPageEnum(Unknown Source)
    at com.thortech.xl.schedule.tasks.ActiveDirectoryReconTask.performReconciliation(ActiveDirectoryReconTask.java:248)
    at com.thortech.xl.schedule.tasks.ActiveDirectoryReconTask.execute(ActiveDirectoryReconTask.java:97)
    at com.thortech.xl.scheduler.tasks.SchedulerBaseTask.run(Unknown Source)
    at com.thortech.xl.scheduler.core.quartz.QuartzWrapper$TaskExecutionAction.run(Unknown Source)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.security.Security.runAs(Security.java:41)
    at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
    at com.thortech.xl.scheduler.core.quartz.QuartzWrapper.execute(Unknown Source)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:178)
    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:477)
    --------------------------------------------------------------------------------

    Thanks Justin,
    for all your help and support.
    there was some settings to be done in the exchange server. and today the system admin co-operated with me and did the changes in the exchange.
    now the messaging is working fine.
    Thanks,
    Rashed

  • SharePoint Foundation 2013 installed on Windows Server 2012 not sending out email notification

    I have a server where i installed SP Foundation 2013 on top of Windows Server 2012. I have configured the SMTP as well as the outgoing SMTP in Central Administration
    of SharePoint. When i create an alert on a document library, its did not sent any email notification on the changes made to the document in the document library. So, i created a workflow to send out email using SPD2013. The workflow run, but it cannot sent
    out email with error saying that outgoing email is not configured correctly. I have checked with another server which i installed SP foundation 2013 on top of Windows Server 2008 R2 - its sending out email just fine using same configuration and outgoing SMTP.
    I need help to resolve this issue or at least the cause of the problem.
    Any help is greatly appreciated.

         
    Try below:
    http://social.technet.microsoft.com/wiki/contents/articles/13771.troubleshooting-steps-for-sharepoint-alert-email-does-not-go-out.aspx
    Go to Central Admin ---->Operations----->outgoing email settings and verify that SMTP server is mentioned correctly 
    2) Test the connectivity with the SMTP server.
    In order to do that follow these steps:
      Open  cmd
      telnet <SMTP server name> 25 ( We connect smtp server to the port 25)  
                     you should see a response  like this 220 <servername> Microsoft ESMTP MAIL Service, Version: 6.0.3790.3959 ready at date and time
                     Beware that different servers will come up with different settings but you will get something
                     If you dont get anything then there could be 2 possible reasons, either port 25 is blocked or 
                     the smtp server is not responding.
      For testing response from your server
                       For testing response say ehlo to it.
                            Type :
                                        ehlo <servername>
                            output:
                                        250 <servername> Hello [IP Address]
      Now a test mail can be sent from that SharePoint server. 
                          Now we need to enter the From address of the mail.
                          Type :
                           mail from: [email protected]
                           output:
                           250 2.1.0 [email protected]….Sender OK
     It's time to enter the recepient email address.
    Type : rcpt to: [email protected]
    output:
    250 2.1.5 [email protected]
     Now we are left with the data of the email. i.e. subject and body.
    Type : data
    output:
    354 Start mail input; end with <CRLF>.<CRLF>
    Type:
    subject: this is a test mail
    Hi
    This is test mail body
    I am testing SMTP server.
    Hit Enter, then . and then Enter.
    output:
    250 2.6.0 <<servername>C8wSA00000006@<servername>> Queued mail for delivery
    Type: quit
    output:
    221 2.0.0 <servername> Service closing transmission channe
    3)  Check alerts are enabled for your web application
          verify if the windows timer service is running or not.
          Run this stsadm command to check that
          Stsadm.exe -o getproperty -url http://SharePoint-web-App-URL -pn alerts-enabled
         This should return <Property Exist="Yes" Value="yes" />
         If you don’t get this, Enable alerts by:
         stsadm.exe -o setproperty -pn alerts-enabled -pv "true" -url http://SharePoint-web-App-URL
          If its already enabled, try turn off and turn on it back.
    4)  Check the Timer job and Properties
           Go to
           MOSS 2007:  Central Administration > Operations > Timer Job Definitions (under Global Configuration)
           In SharePoint 2010: Central Administration > Monitoring > Review Job Definitions 
           Check whether the "Immediate Alerts" job is enabled for your web application. check these properties:
                       job-immediate-alerts
                       job-daily-alerts 
                       job-weekly-alerts
           stsadm.exe -o getproperty -url "http://Your-SharePoint-web-App-URL" -pn job-immediate-alerts
           The expected output is:
           <Property Exist="Yes" Value="every 5 minutes between 0 and 59"/>.  
           If you don’t get this, run the following command to set its value.
           stsadm.exe -o setproperty -pn job-immediate-alerts -pv “every 5 minutes between 0 and 59" -url http://Your-SharePoint-web-App-URL
    5)  Check whether the account is subscribed for alerts and it has a valid email account. This should be the first thing to check if the problem persists for some users not for      all.
    6)  Then check if at all those users have at least read permission for the list. Because the first mail should go out for every user without security validation but the next ones       won't be delivered unless the user has at least read
    permission.
    7)  If it is happening for one user, can also try to delete and re add the user in the site.
    8)  Most importantly , you should try this one.
          Run this SQL query to the content db < Select * from Timerlock>
          This will give you the name of the server which is locking the content database and since when.
          In order to get rid of that lock 
          Go to that server which is locking the content db and then restart the windows timer service.
          within some time it should release the lock from content db, if not then at the most stop the timer job for some time
          Once the lock will be released then try to send some alerts
          You will surely get the email alert.
    I found this is the most probable reason for alert not working most of the time. We should start troubleshooting with above steps before coming to this step for any alert email issue but from step 1 to step 7 are best for new environments or new servers.
    If the issue is like this ,alert was working before and suddenly stopped working without any environmental change then above conditions in step 1-7 should be ideally fine.
    Even after this if it is not working, then you can try these few more steps too
    9)  Try re-registering the alert template:
    stsadm -o updatealerttemplates -url http://Your-SharePoint-Web-App-URL -f  "c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\XML\alerttemplates.xml" -LCID 1033
    10)  Try to clear the configuration cache
    If this helped you resolve your issue, please mark it Answered

Maybe you are looking for