Skip to main content

 

Our company moved to office 365 and the mail port and protocol changed. I adjusted the mails sent from the events tab in IFS. I cannot run mails sent from PLSQL. Where can I change the settings?

 

With the following settings, mails sent from the events tab work.

 

 

 

 

Working mail is not working for the example procedure below.

PROCEDURE SISTEM_BILGISI
IS

parameter_attr_    VARCHAR2(2000);
      result_key_        NUMBER;
      report_attr_       VARCHAR2(2000);
      msg_               VARCHAR2(32000); 
      print_job_id_      NUMBER;
      attr_              VARCHAR2(4000);
      date_              DATE;
      attach_            VARCHAR2(2000);
      text_              VARCHAR2(32766);
      subject_           VARCHAR2(2000);
      deger_           VARCHAR2(2000);
      
   BEGIN
       IFSAPP.Log_SYS.Init_Debug_Session_('en');
  

   
          Command_SYS.Mail(
            from_user_name_ => 'IFSAPP',
            to_user_name_ => 'ayilmaz@sefine.com.tr',
          ---  cc_ => 'ayilmaz@sefine.com.tr',
            text_ => 'vvvvvvv' ,
            attach_ => attach_,
            subject_ => 'aaaaaa' );
            
   General_SYS.Init_Method(Sfn_Bt_Tcr_To_Ask_Util_API.lu_name_, 'Sfn_Bt_Tcr_To_Ask_Util_API', 'SISTEM_BILGISI');
END SISTEM_BILGISI;

I am waiting for your valuable information.

Hi @ADNAN 

Is there an error appearing when executing the code?

If not, then check the IFS page Application Messages / Notifications queue.  You’ll probably see a failure message saying that the mail sender is not configured correctly.


 

hi

@paul harland 

The problem is there I can send an e-mail from the e-mail I choose with Default Instance, but I cannot send an e-mail with an e-mail address that I did not choose as Default in PL SQL.

 

 

 

but the mail goes with defaul chosen.

 

 


I’m not sure but I think I understand the question...

If using an IFS Event Action, choose the mail sender here (Apps 10)

If doing it through the API, you can submit the mail sender as a parameter here in Command_sys.mail

 


Hi Adnan ( @ADNAN ),

Have you considered using the UTL_SMTP Oracle package instead of Command_Sys.Mail?

https://oracle-base.com/articles/misc/email-from-oracle-plsql

https://www.morganslibrary.org/reference/pkgs/utl_smtp.html

Useful resources above.

I find it much more powerful and suits my use cases perfectly.

Cheers,

Pete


hi @paul harland 

 

no sender parameters :(

 

PROCEDURE SISTEM_BILGISI
IS

parameter_attr_    VARCHAR2(2000);
      result_key_        NUMBER;
      report_attr_       VARCHAR2(2000);
      msg_               VARCHAR2(32000); 
      print_job_id_      NUMBER;
      attr_              VARCHAR2(4000);
      date_              DATE;
      attach_            VARCHAR2(2000);
      text_              VARCHAR2(32766);
      subject_           VARCHAR2(2000);
      deger_           VARCHAR2(2000);
      
   BEGIN
       IFSAPP.Log_SYS.Init_Debug_Session_('en');
  

   
          Command_SYS.Mail(
            from_user_name_ => 'AYILMAZ',
            to_user_name_ => 'ayilmaz@xxx.com.tr',
          ---  cc_ => 'ayilmaz@sefine.com.tr',
            text_ => 'vvvvvvv' ,
            attach_ => attach_,
            subject_ => 'aaaaaa' );
            
   General_SYS.Init_Method(Sfn_Bt_Tcr_To_Ask_Util_API.lu_name_, 'Sfn_Bt_Tcr_To_Ask_Util_API', 'SISTEM_BILGISI');
END SISTEM_BILGISI;


Press these in blue

 

The other two options for COMMAND_SYS.MAIL have mail_sender

 


 hi @CallumW 

it says the variable number is wrong.

 

 

it says the variable number is wrong.


Your Mail Sender is called MUT_MAIL_SENDER not ayilmaz@XX.com.tr


@CallumW

The problem I'm having is not the parameter value.

The number of error variable types the procedure gave me is wrong.

 


Use the other one. The one you are using is expecting a table for the attachments - you are sending it text.

COMMAND_SYS.Mail(sender_      => 'IFS Applications!',
from_ => 'ayilmaz@xx.com.tr',
to_list_ => 'ayilmaz@xx.com.tr',
cc_list_ => '',
bcc_list_ => '',
subject_ => 'Subject',
text_ => 'Text',
attach_ => '',
rowkey_ => '',
mail_sender_ => 'MUT_MAIL_SENDER');

 


@CallumW  thank you so much.


Hey, I tried to directly pass a file path into attach_  but it does not work, should I do something before this to make sure I’m able to send the mail including the attachment. Thanks in advance 


 I’m seeing this error, when I add the local file path in attach_ in command_sys method, any idea why i’m seeing this error? 


Reply