Emails headers received as part of email text

We are using the script below to send email notifications. When a user receives the mail part of the email headers are included in the message body. I have included an example underneath the script.
procedure pm33_verification_mail  ( email_in  in varchar2 default NULL ) is
Cursor EMAIL_USERS is
Select distinct CM503_EMAIL_ADDRESS
From   MES.TM503_VERIFICATION_REPORT
Where  CM503_DURATION = 24
Order By CM503_EMAIL_ADDRESS ASC;
l_conn              UTL_SMTP.CONNECTION ;
l_mime_type         VarChar2(100) ;
l_email_address     VarChar2(30000) ;
l_subject           VarChar2(1000) := 'Verification Still Outstanding ' ;
l_line              VarChar2(30000) ;
errmsg              VarChar2(500) ;
l_data                     VarChar2 ( 1 )          ;
l_ver_hours         Number := 24 ;
Cursor WC_LIST is
Select CM306_PARAMETER_VALUE
From  MES.TM306_SCHEDULING_PARAM_ITEMS
Where  CM306_PARAMETER_TYPE  = 'REP'
and  CM306_PARAMETER_NAME  = 'WC_VERIFICATIONS'
Order by CM306_PARAMETER_INDEX      ;
l_work_centre          VarChar2(100)          ;
l_count             Number                ;
begin
If to_char( sysdate,'dd') = '01' then
+     l_ver_hours := to_number(to_char(sysdate,'hh24'))+1 ;+
End If ;
+     +
if email_in is NULL then
for R1 in EMAIL_USERS loop
if l_email_address is NULL then
l_email_address := R1.CM503_EMAIL_ADDRESS ;
else
l_email_address := l_email_address||';'||R1.CM503_EMAIL_ADDRESS ;
end if;
end loop;
else
l_email_address := email_in ;
end if;
l_mime_type     := 'text/plain';
l_conn := MES.KM999_DBMS_MAIL.BEGIN_MAIL ( sender     => 'MES',
recipients => l_email_address,
subject    => l_subject,
mime_type  => l_mime_type )  ;
l_data := 'N' ;
for R1 in WC_LIST loop
begin
Select count(*)
into l_count
From   MES.VM312_OUTSTANDING_VER
Where  CM312_WORK_CENTRE = R1.CM306_PARAMETER_VALUE
and  ( SYSDATE - CM312_DATE ) * 24 >= l_ver_hours ;
exception
+     when OTHERS then+
+          l_count := 0 ;+
end ;
+          +
If  l_count > 0 then
l_data := 'Y' ;
l_line      := '============================================================'  || chr(10) ;
MES.KM999_DBMS_MAIL.WRITE_TEXT ( conn => l_conn , message => l_line ) ;
l_line  := 'Verification Outstanding at the ' || SubStr(R1.CM306_PARAMETER_VALUE,1,Length(R1.CM306_PARAMETER_VALUE)-1) || ' for more than '||to_char(l_ver_hours)||' hours:'  || chr(10) ;
MES.KM999_DBMS_MAIL.WRITE_TEXT ( conn => l_conn , message => l_line ) ;
l_line      := '------------------------------------------------------------'  || chr(10) ;
MES.KM999_DBMS_MAIL.WRITE_TEXT ( conn => l_conn , message => l_line ) ;
Declare
Cursor DATA_OUT is
Select CM312_ID   ,
+     CM312_DATE+
From  MES.VM312_OUTSTANDING_VER
Where  CM312_WORK_CENTRE = R1.CM306_PARAMETER_VALUE
and  ( SYSDATE - CM312_DATE ) * 24 >= l_ver_hours
Order By CM312_DATE;
begin
For R2 in DATA_OUT Loop
l_line := R2.CM312_ID || ' Outstanding since ' || TO_CHAR ( R2.CM312_DATE , 'YYYY-MM-DD HH24:MI') || ' ('
+|| Round ( ( SYSDATE - R2.CM312_DATE ) * 24 , 2 ) || ' Hours)' || chr(10) || chr(10);+
MES.KM999_DBMS_MAIL.WRITE_TEXT ( conn => l_conn , message => l_line ) ;
End Loop;  -- DATA_OUT
l_line      := ' '  || chr(10) ;
MES.KM999_DBMS_MAIL.WRITE_TEXT ( conn => l_conn , message => l_line ) ;
end ;
End if ;    --- Count  > 0
End Loop;  ---WC_List
If l_data = 'N' then
l_line             := '============================================================'  || chr(10) ;
MES.KM999_DBMS_MAIL.WRITE_TEXT ( conn => l_conn , message => l_line ) ;
l_line          := 'No Verification Problems '  || chr(10) ;
MES.KM999_DBMS_MAIL.WRITE_TEXT ( conn => l_conn , message => l_line ) ;
l_line             := '============================================================'  || chr(10) ;
MES.KM999_DBMS_MAIL.WRITE_TEXT ( conn => l_conn , message => l_line ) ;
end if ;        
MES.KM999_DBMS_MAIL.END_MAIL( conn => l_conn )   ;
end ; /* pm33_verification_mail */
+/+
Email body Example:
To: <all mail addresses are included in this.>
Subject: Verification Still Outstanding
Content-Type: text/plain
X-Mailer: Mailer by Oracle UTL_SMTP
Return-Path: [email protected]
Message-ID: <[email protected]>
*X-OriginalArrivalTime: 15 Dec 2010 05:00:19.0110 (UTC) FILETIME=[F868FC60:01CB9C14]*
Date: 15 Dec 2010 07:00:19 +0200
*============================================================*
Verification Outstanding at the CONARC for more than 24 hours:
*============================================================*
Verification Outstanding at the LHF for more than 24 hours:
------------------------------------------------------------

user13482457 wrote:
Email body Example:
<snipped>I do not see the Mime version being specified in the header - though this should not case the headers to display as part of the mail body.
Confirm the header as correct (no empty lines and an empty line separator between it and the body) using the raw content of the e-mail as received by the mail client. This will be the easiest method to spot the error in the e-mail structure.
In other words - first identify the actual problem before getting stuck in your PL/SQL code looking for an unknown problem.

Similar Messages

  • Iphone 5 giving short vibrator pulses while talking, no emails, texts, or notifications received.

    While I'm having a conversation with someone, my I 5 will give a short vibrator pulse every few seconds, and I won't have received any emails, texts, other calls, or any notifications of any kind. There doesn't seem to be any apparent reason for it, I've seen questions from others about the phone vibrating when they receive a text or an email while they are talking, but none about getting random vibrator pulses for no apparent reason. It doesn't seem to be specific to any type of number either (toll free, long distance etc.). Does anyone know why thid happens?

    Hey Sderbawka1,
    Thanks for the question. Let’s see if we can isolate this issue further. Does restarting or resetting your iPhone resolve the issue?:
    Turn your iOS device off and on (restart) and reset
    http://support.apple.com/kb/HT1430
    If not, the next applicable step will be to backup and restore your device:
    Choosing an iOS backup method (Should I use iTunes or iCloud to back up my iOS device?)
    http://support.apple.com/kb/HT5262
    Use iTunes to restore your iOS device to factory settings
    http://support.apple.com/kb/HT1414
    Thanks,
    Matt M.

  • Signature Bugs and Truncated Email Text

    I have recently upgraded to Leopard on my Macbook, iMac and we have Leopard on our studio computers here as well. This morning I was writing a memo for my employer to send out to our staff. He received the email fine with no errors, but when he forwarded the notice out and cc'd me on the message, part of the text was severely truncated in random areas and his signature has bits of code, strange fonts and characters added. The message looks absolutely fine from his sent folder. This doesn't happen with every message but it has occurred fairly often. We have tested it on different email servers and machines running Leopard with the same result.
    Is anyone else having this issue? Is it a known bug? Any possible solutions?

    Similar problem to mine. We rtoo have upgraded to Leopard. In our Signatures for corporate email we have a jpg Logo with our name, title and contact details below it etc. After shutting down Mail or restarting from an upgrade session, the logo is wiped out and all that's left is a tiny blue square with a question mark in it above our names and addresses etc.

  • Emailing photos as attachments rather than embedded in email text

    Hi
    I have set my mail preferences to send emails as plain text rather than RTF.
    Here is what happens
    Route 1) I export a photo from iphoto to my desktop, then open the Mail program, create a new email to my friend who uses Outlook on WIndows, and ATTACH the photo from my desktop. Whilst from my mac end, it looks as though the photo is embedded in the text of the email, when my friend receives it in Outlook, the photo is "attached" just as I wanted it to be, and is not embedded in the text. So route 1 works
    Route 2) I select the photo in iphoto and click the Email icon within iphoto at the bottom right of the screen. The email program opens and the photo appears (as before) to be embedded in the email text rather than attached. This time when I send this to a friend using outlook on Windows, the email arrives with the photo still embedded in the body of the email, and not as an attachment. So this route does not work
    Any ideas why route 2 is overriding the preference settings an sending in RFT (assuming that is what it is doing)? Can I change this?
    Is there a way to make the "Email" icon in Mail work the same way - i.e. to attach the photo as an attached file rather than embed in the text of the email?
    I ask because I send photos for people to save in original size and format so they can print - embedded photos in the text are no good for this
    Thanks

    You should deselect having iPhoto include any caption or file names. Having those following each photo is likely the source of this behavior. When sending to such recipients, you should have all attachments last in the message, and with no text following or between them.
    Also, when the message appears in the Compose window, an extra safeguard is to then click on Format in the menubar, and choose Make Plain Text. I use Aperture, rather than iPhoto, and always do this step, and would also do with iPhoto.
    Ernie

  • Email text will not display

    I've recently noticed a problem where I can't get email text to display in my iPhone. Part of the text can be seen in the preview, but when I open the message, the entire message body is blank. When I download the email to my desktop computer or check it using hotmail/gmail/ etc , the messages are clearly there and real - I just can't see them when using iPhone's mail program.
    Has anyone encountered this problem and have a fix?

    Try force-closing the Mail app: double-tap the home button, locate Mail in the list at the bottom, tap and hold it until it wiggles, tap to close it, tap the home button again.  Now open Mail again and see if you can read your email correctly.

  • When using Hotmail my email text appears black, but when I look at them in my sent folder they are going from black to grey. Can this be resolved?

    When using hotmail my email text appears blac, but when I get replies or look at the sent folder the emails are partly black text and then go grey, how do I stop this happening all the time please

    Which email service provider are you using?  You can install DropBox and share links to the files that way.  When you snd to your self (cc or bcc) do the items show up?  What file types and sizes are these attachments?  Are you sending over WiFi or cellular connection?  Try using more than one email account from a different provider (Gmail, yahoo, iCloud, etc) and see if it is email provider specific.

  • Email text font size too small.

    When receiving email text from various sources, the size of the text is so small it is almost impossible to read.  I have a 27"iMac running Snow Leopard at 1920x1200 resolution.  How can I adjust my computer so that text is larger and more readable??  Thanks for any helpful suggestions.

    You can set that in Mail > preferences > Fonts & Colors > Message font:
    You can also hit CMD +  or CMD - to alter the size temporarily.
    Regards,
    Captfred

  • Automatically populate email text upon entry of send email screen...

    CRM 7
    Within  the Account/Activity screen a user can choose More->Send_email and an empty email form is displayed to be completed.
    We want to default the content via an email template in some way. Email templates are used extensively within CRM (services/marketing etc) so I wondered if there is a standard transaction which allows for an email template to be set up for a certain configuration.
    Failing that, I wondered if anyone had automatically populated the email text upon entry of the screen. We need to autopopulate it with some standard text and possibly a URL with references back to the Account/Activity.
    Jason

    Jason,
    Yep I have done this before.  You can either use a copy control BADI to generate the text template or use text copy determination.
    The way this works is the following:
    1) The activity is transaction type A
    2) The e-mail is transaction type B
    Setup copy control procedure with a custom routine from A->B.  In your copy control routine, populate the parts of the e-mail transaction as needed.
    The other option is to have a text element on the activity be generated when saving via the CRMV_EVENT framework.  Then for the e-mail transaction you use a text determination procedure to read the created text over.
    Take care,
    Stephen

  • Why is my email text jumbled since upgrading to iOS 5

    My email text are overlapped since upgrading...any suggestions to fix tis?

    Have you tried closing the Mail app completely and seeing if it looks ok when you re-open it ? From the home screen (i.e. not with Mail 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Mail app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    If that doesn't work then you could try a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • Using eprint to print photos with email text on one page

    I have been using Presto eprint services for several years for my Dad, and I really like how it works and allows me to print the email (from, to, text in the body of the email), plus any attachments, all on one page using full letter size paper  However, my parents would like to get rid of their land-line phone, so I'm looking for options to replace the Presto printer.  I was thinking that HP eprint might be a good option, but based on some initial tests with a friends printer, it seems to just print photos as full page images, without the email content.  Is there anyway to confirgure the HP eprint function to print the email text and photos or PDF file attachment on one page?  Thanks.

    Hello @Joseph_TX ,
    Welcome to the HP forums.
    I understand that you want to know if a way to configure the HP ePrint.
    I would like to help.
    Unfortunately there is no way to reconfigure the ePrint.
    When you send an email to the printers ePrint address, it will print the body of the email and any attachments.
    It will not print the subject line or who the email is from.
    Also the ePrint feature will not resize pictures sent.
    What you send is what you get.
    You can get more control over ePrint with the ePrint app, but I don't believe that will suit your needs.
    Please call our Cloud Services at 855-785-2777.
    If you live outside the US/Canada Region, please click the link below to get the support number for your region. http://www8.hp.com/us/en/contact-hp/ww-phone-assist.html
    Hours:
    Mon-Fri. 8am - 11pm, Sat. 9am-8pm - EST
    Mon-Fri. 7am - 10pm, Sat. 8am-7pm - CST
    Mon-Fri. 6am - 9pm, Sat. 7am-6pm - MST
    Mon-Fri. 5am - 8pm, Sat. 6am-5pm - PST
    Aardvark1
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!

  • How to email text from a text component in my applet on a the host server ?

    How to email text from a text component in my applet on a the host server, back to my email address ?
    Assuming I have Email Form on the host server.
    Help will be appreciated.

    You can do like below
    =REPLACE(Fields!Column.Value," " & Parameters!ParameterName.value & " ","<b>" & Parameters!ParameterName.value & "</b>")
    The select the expression and  right click and choose placeholder properties
    Inside that set Markup type as HTML 
    then it will highlight the passed parameter value in bold within the full xml string
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • My 16gb iPhone 4S keep tell me that my storage is almost full and I don't have enough space for any upgrades. I don't have any music or videos on my phone. I deleted all old emails, texts, contacts and apps but still nothing. When I check my settings, I n

    My 16gb iPhone 4S keep tell me that my storage is almost full and I don't have enough space for any upgrades. I don't have any music or videos on my phone. I deleted all old emails, texts, contacts and apps but still nothing. When I check my settings, I noticed that my Instagram is at 732mb and it keeps rising. Now it's at 814mb. Please help!!!!!

    What is the precise wording of the message that is occurring?
    Are  you attempting to update via iTunes on a computer or over the air on the device?
    How much free space is actually on the device?
    If updating via iTunes on the computer, how much free space on the computer?

  • TS3274 my ipad won"t turn off. there is a small window with an email text in it and it appears frozen on the screen. How can i turn the ipad off?

    my ipad won"t turn off. there is a small window with an email text in it and it appears frozen on the screen. How can i turn the ipad off?

    Try a reset: Simultaneously hold down the Home and On buttons until the device shuts down. Ignore the off slider if it appears. Once shut down is complete, if it doesn't restart on it own, turn the device back on using the On button. In some cases it also helps to double click the Home button and close all apps BEFORE doing the reset.

  • How to send formatted email text which is maintained in the SE61 by CL_BCS

    Helllo Colleague:
    I maintained some email text template in the SE61, there are some format in these text template. E.g. bold / italics.
    Then I will send these text by the function CL_BCS .
    So how could I send the email with the format which is defined in the SE61? I can get the text information from SE61 by FC:DOCU_GET in 'ITF' format .
    Could you please show some code sample ?
    Thank you
    Best regards
    Wendeng

    so you don't have permission to send email through their mailservers, what a surprise.
    Ever heard of spam? Ever wondered how people manage to send millions of emails through other peoples' servers?
    That's why most companies don't allow you to send email through their servers unless you're located inside their network (and even then require username and password).

  • How do I get a link address to show highlighted in an email text so people can just click on it?

    how do I get a link address to show highlighted in an email text so people can just click it?

    madiandmo wrote:
    This is the deal.  I'm new to having a Mac & using Hotmail via Safari.  When I had a pc I the web browser I used with explorer.  Could it have anything to do with that? 
    no, the link was created for me via Acteva. 
    And, it is not longer than 69 characters. 
    Have you clicked on the link to ensure that it works?

Maybe you are looking for

  • I-tunes says 'The ipod "*****"  is synced with another i-tunes library

    I just downloaded itunes 7.3.1.3. I plugged in my ipod nano (software 1.3.1) and first of all, my library had vanished (I managed to get that back) but now when I click on my ipod in itunes I get the above message (subject line), and the next bit of

  • Printer prints too close to top edge...

    Can not align my labels from either of our 2 pcs so it is printer not settings.....?..normally prints too close to top egde losing first line of text from work doc which is a pain.  Was fine, suddenly decided not to play fair.  Any ideas?  My christm

  • Pdf not opening?

    Anybody has the same problem? blank page opens with small black box

  • Frustrated. problem installing clusterware. no response from metalink

    i've asked metalink and they haven't replied. i'm hoping that the otn community can help. can't get vipca to run manually, post failure to run thru OUI when installing clusterware. comes back with an Exception Error, yet all the cluster readiness tes

  • I need help installing mac os x tiger, disc 2

    my macbook successfully installed disc 1 of mac os x tiger, within minutes, however when it asks for me to insert disc 2, and i do so, it almost finishes installing the disc, then an error message pops up, saying "there were errors installing the sof