Hi Experts,
I am using Command_SYS.Mail() function in Execute Online SQL to send a notification mail via custom event to users.
How can I add a new line in my variable (sending text) without using ‘HTML’ CONTENT TYPE ?
Thanks a lot for your help
Hi Experts,
I am using Command_SYS.Mail() function in Execute Online SQL to send a notification mail via custom event to users.
How can I add a new line in my variable (sending text) without using ‘HTML’ CONTENT TYPE ?
Thanks a lot for your help
Hi
If the content type is text/plain in Mail Sender configuration, then the linefeed character is chr(13). Oracle interprets this into ‘\n’ new line character. You can structure your email message as below:
Eg:
BEGIN
command_sys.mail('','example@email.com','Line1'||chr(13)||'Line2');
END;
If the content type is text/html, then you can use the <br> HTML tag.
Eg:
BEGIN
command_sys.mail('','example@email.com','Line1<br>Line2');
END;
Hope this helps!
Hello
If you set up your mail_sender with content-type : text/plain, as
Try to setup like this way to use chr(13) characters in your email body. In Oracle \n character is not supported to add new lines.
Cheers!
Thanks everyone for your help
A standards-compliant email message would use both a carriage return and a line feed to represent a new line.
'Line 1' || CHR(13) || CHR(10) || 'Line 2'
/*
CR = 13
LF = 10
*/
In the bad old days, if you sent a UNIX-style LF, email servers written to the letter of the RFC spec would complain of a “naked line feed”.
However, even if you take care to do this correctly, Microsoft Outlook might still remove them:
Line breaks are removed in posts made in plain text format - Outlook | Microsoft Docs
Table from asciitable.com:
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.