HTML in body of mail
Hi All,
I have to schedule DB reports in HTML format through mailx .
How Report are send as body in HTML format .
Thanks,
Manish
See this program
But here whats the problem is ,
some maiservers doesnot support html code if u send this mail to yahoo account it will show html code as it is,
hotmail account encodes the html and shows proper fonts and headings
import java.io.*;
import java.util.*;
import java.net.*;
import sun.net.smtp.SmtpClient;
public class SendMail {
public static void main(String args[]){
int i = 0;
//while (true) {
SmtpClient mail;
try{
i++;
String email = "[email protected]";
String from="[email protected]";
mail=new SmtpClient("bizpivot.com");
mail.from(from);
mail.to(email);
PrintStream msg=mail.startMessage();
msg.println("To: " +email);
msg.println("Subject: Hai" i "!!!");
msg.println("<html><head><title>Untitled</title></head><body bgcolor='red' text='#00ffff'><font face='Courier New' size='+3'>Hai How are you Man!!!</font></body></html>");
mail.closeServer();
System.out.println(i);
catch(Exception e){e.printStackTrace();}
Similar Messages
-
AppleScript: Change an order of texts and HTML file in the body of Mail
I would like to know how to insert a HTML file below the Signature in the body of Email.
This is my code,,,,
set the clipboard to (read (choose file) as «class RTF »)
set theBody to "Hello"
tell application "Mail"
activate
set theMessage to make new outgoing message with properties {content:theBody, visible:true, subject:"mysubject"}
end tell
tell application "System Events"
tell process "Mail"
set focused of UI element 1 of scroll area 1 of window 1 to true
keystroke "v" using command down
end tell
end tell
What I would like to do is an order of body going like
From the top:
Body
Signature
HTML rtf file
Please teach me how to do!
Cheers,Hi,
murrayshimada wrote:
Wondering how about inserting a HTML between body and signature? If you have a free time, please give me a tip again. Anyway, thank you for your help. Cheers,
You can set the order like this:
set the clipboard to (read (choose file) as «class RTF »)
set theBody to "Hello" & return & return -- need two return character to paste the clipboard after the body
tell application "Mail"
activate
set theMessage to make new outgoing message with properties {content:theBody, visible:true, subject:"mysubject"}
my pasteToEnd()
delay 0.6 -- need a delay to not remove the pasted text.
set message signature of theMessage to signature 1 -- this put the signature after the text
end tell
on pasteToEnd()
tell application "System Events"
tell process "Mail"
set focused of UI element 1 of scroll area 1 of window 1 to true
key code 125 using command down -- (arrow down + command down) to set the insertion point to the end of text
keystroke "v" using command down
end tell
end tell
end pasteToEnd
Here's another example, the order = the HTML, the body and the signature:
set the clipboard to (read (choose file) as «class RTF »)
set theBody to "Hello"
tell application "Mail"
activate
set theMessage to make new outgoing message with properties {content:"theBody", visible:true, subject:"mysubject"}
my pasteAtBeginning() -- at beginning
delay 0.6 -- need a delay to not remove the pasted text.
set message signature of theMessage to signature 1 -- this put the signature after the text
end tell
on pasteAtBeginning()
tell application "System Events"
tell process "Mail"
set focused of UI element 1 of scroll area 1 of window 1 to true -- this set the insertion point at beginning
keystroke "v" using command down
keystroke return & return -- to put a blank line between the RTF and the body
end tell
end tell
end pasteAtBeginning -
How to send ALV list report as html attachment in a mail??
Hi all,
I have an ALV report which I want to send as an HTML attachment in a mail to an external id. I know that spool can be converted to HTML attachment in a mail. But I don't want to have 2 programs - one for generating ALV and the other to send mail with the spool-converted of the first report as attachment. I want to send the mail in the same program itself. Is it possible? Helpful answers will be suitably rewarded.Hi Sandip,
In your ALV program after the alv output is build in the program do the following steps.
1). Export the list to memory
2). Import the list from mempry
3). Do a COmpress of the data
4). Send an email as an attachment using the normal FM.
Take a look at the following links which will explain how to do the above steps.
http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp
http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm
remember to change the doc type as 'HTM' in the FM to send email.
Cheers
VJ -
How can I embed an html signature in my mail
how can I embed an html signature in my mail signatures? I have done it easy with older operating systems, but have no idea with the 10.8.2. Following the olds steps don't work...can't "save as" in the library...that folder isn't even an option
http://code.coneybeare.net/how-to-make-and-html-signature-in-apple-mail
-
I want while replying incoming mails to drag files to mails but not in body of mail , more over the available type of attachments is only photo or video so how I can attach another type
There is no dragging of anything in iOS.
Attach as many files or emails as you'd like until it reaches the max capacity of attachements for the email provider. -
Workflow- sending a html file in a mail(outlook)
Hi Guys,
i want to send a html file in a mail(outlook) in workflow. whenever enduser click that file its open automatically sap inbox.
html file belongs to a logo, if we click on that file it will automatically opens the SAP INBOX.
this is the my requirement.
give me suggestion for this requirement or any other solution.
we appriciate your reply.
Thanks
Sankar.
Message was edited by: sankar suryaUnless you are prepared to zip and email every folder and
file related to
the page,
exactly as it is on your computer, it would be wiser to
upload it all to
your hosting
server, and send a link to the recipient.
"2start" <[email protected]> wrote in
message
news:erat61$h8m$[email protected]..
>I need to email a frame page I have created in
DreamWeaver.. How can I do
>that? -
Hi,
Can you please tell me how I can embed HTML in an e-mail?
My message contains tags like <b> but when the e-mail is sent, I can see the same tags.
Please help
Thanks
LuanneI have already tried this and this is the error I get :
Sending failed; nested exception is: javax.mail.MessagingException: IOException while sending message; nested exception is: javax.activation.UnsupportedDataTypeException: no object DCH for MIME type text/html -
Mail from Workflow to external system with mail text in body of mail
Hi All,
I have extended workflow WS12300111 to send mail to external system. But in external system mail text is coming in attachment & without formating (Multiple lines are coming in single Row).
I want to know how to send text in body of mail (instead of attachment) to external system, when we are sending mail using Send Mail option in Workflow.
Thanks & Regards,
RajeshThanks Rick, I am aware of this function module - but trying to use workflow tool - "Mail Send" option. I need to send text & link to my portal application.... Now I can send text in body of mail... but how can we provide link in mail to open portal application to make user to perform required action (Leave approve or Reject etc)..
I am new to Workflow soo learning thru my errors and from queries on SDN
-Rajesh -
Change e-mail body in mail adapter using module.
Hi All,
I am woking with one mail adapter and I prepared one code to change the attachement name and body content. The attachement is working good but the body e-mail is not working.
After to check a lot of blog my code now is creating two attachements one with the Payload (xml) and other with the text that suppose to come as a body e-mail.
Someone could help me ?
Thanks a lot.
Michael PerettoHi Michael,
Can you check if your main attachment (the one that should be the mail text) does not carry the wrong content-disposition header?
The easiest way to check is to use some message capturing tool (e.g., TCPGateway attached in the SOAP FAQ Note). If this header is present, it should have value inline to inform the mail client to display the content in inline. If the value is set wrong, the MessageTransformBean module can be misused to repair this content header.
Best regards, Yza -
How to receive HTML email using JAVA Mail API?
Hello!
I am developing WEB Mail System. There is a little problem. I am unable to receive mail in HTML format. The mail is being received in only text format currently. What method do i need to use to achieve this functionality currently i am using
MimeMessage message = mail.getMessage();
if(message.isMimeType("text/plain")){
String str_message_body = message.getContent().toString();
else
Multipart multipart = (Multipart)message .getContent();
Kindly advise me regarding that because i am in a state of fix right now and unable to proceed further.
I will really appreciate a prompt response from you.
Regards,
Burhan Ramay.HTML is a text format too, so you do
if(message.isMimeType("text/html")){
String str_message_body = message.getContent().toString();
} -
HTML attachments of the mail can not be opened
I can not open HTML attachments of the mail in the PlayBook. Is there any solution to this???
Please review the following information.
http://btsc.webapps.blackberry.com/btsc/microsites/search.do?cmd=displayKC&docType=kc&externalId=KB2... 0 1716682976
Be a Shepard and not an iSheep. -
Text type 'HTML' for the Channel 'Mail (Letter)'
Dear Experts,
I'm unable to use the text type 'HTML' for the Channel 'Mail (Letter)' in mail forms, as a result of which fonts like arial and images like jpeg could not be used in mail forms created for letters.
Is there a way to use HTML type or to have more font options, insert JPEG images, tables etc in mail forms for letters?
Regards,
KathirIn case, if you are using custom excel export functionality, you should use fileDownloadActionListener with in a button.
Here, you could specify the content type.
<af:commandButton text="Say Hello">
<af:fileDownloadActionListener filename="hello_txt"
contentType="text/plain; charset=utf-8"
method="#{bean.sayHello}"/>
</af:commandButton>For more details, check here:
http://docs.oracle.com/cd/E16162_01/apirefs.1112/e17491/tagdoc/af_fileDownloadActionListener.html -
Flash embed tag does not obey percentage size, even with html and body at 100%
For some reason i cannot get this swf file to show at 90% width and height. i have tried adding a style sheet in the header to explicity set the html and body to 100% but this still does not help. can anyone see if there is a problem in the code?
<pre><nowiki><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<style type="text/css">
html, body {
margin: 0;
padding: 0;
height: 100%;
width: 100%;
</style>
</head>
<body>
<center>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="90%" height="90%" ID="Captivate1">
<param name="movie" value="tutorial.swf">
<param name="quality" value="high">
<param name="menu" value="false">
<param name="loop" value="0">
<embed src='tutorial.swf' width='90%' height='90%' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'/>
</object>
<BR>
<p>
<align=center><a Href="javascript:window.close();">Close Window</a>
</p>
</center>
</body>
</html></nowiki></pre>That may happen because of the <center> element that doesn't have a height and width specified. Remember to specify dimensions for all containers if you use percentages, otherwise you may end up with 90% of 0 or a default value.
-
Send email including the data field into the html message body
Hi all,
I would like to send an email to each recipient once only, and including a data field into the html body message. I am not sure how to achive that with my current stored procedure.
USE [CallManager]
GO
/****** Object: StoredProcedure [dbo].[PersonalCallsReminder] Script Date: 08/27/2014 10:26:55 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
ALTER PROCEDURE [dbo].[PersonalCallsReminder]
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Email Users
declare @email varchar(max)
declare mycursor cursor FAST_FORWARD for
SELECT dbo.HumersStaffExtension.email
FROM dbo.Calls_Mobile_Header INNER JOIN
dbo.HumersStaffExtension ON
dbo.Calls_Mobile_Header.TelNumber = dbo.HumersStaffExtension.telnr_prv COLLATE SQL_Latin1_General_CP1_CI_AS
GROUP BY dbo.Calls_Mobile_Header.RecordStatus, dbo.HumersStaffExtension.usr_id, dbo.HumersStaffExtension.email,
dbo.HumersStaffExtension.res_id
HAVING (dbo.Calls_Mobile_Header.RecordStatus = N'0') AND (NOT (dbo.HumersStaffExtension.email IS NULL))
OPEN mycursor;
FETCH NEXT FROM mycursor
INTO @email
WHILE @@FETCH_STATUS = 0
BEGIN
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'CallsManagement',
@recipients = @email ,
@body_format = 'HTML',
@subject = 'Personal Calls Reminder',
@body = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Personal Calls Reminder</title>
<style type="text/css">
body {
font-family: "Times New Roman", Times, serif;
font-size: 11pt;
.auto-style1 {
background-color: #FFFF00;
</style>
</head>
<body>
<div>
<table style="width: 800px">
<tr>
<td>Dear,<br />
<br />
Please review your phone bills and submit your personal calls using the following link:<br />
<a href="http://companyxyz/personalcalls/">Personal Calls</a></td>
</tr>
</table>
<br/>
<table style="width: 800px">
<tr>
<td><strong>Kindly be informed that the deadline to process new bills is on the
<span class="auto-style1">15th of each month</span>.</strong></td>
</tr>
</table>
<br/>
<table style="width: 800px">
<tr>
<td>For assistance, please contact <a href="mailto:[email protected]">[email protected]</a></td>
</tr>
</table>
<br/>
<table style="width: 800px">
<tr>
<td><strong>*** This is an automatically generated email, please do not reply ***</strong></td>
</tr>
</table>
</div>
</body>
</html>
FETCH NEXT FROM mycursor
INTO @email
END
CLOSE mycursor;
DEALLOCATE mycursor;
END
Changing the query to the following:
SELECT TOP (100) PERCENT dbo.HumersStaffExtension.email, dbo.Calls_Mobile_Header.ExtractDate
FROM dbo.Calls_Mobile_Header INNER JOIN
dbo.HumersStaffExtension ON
dbo.Calls_Mobile_Header.TelNumber = dbo.HumersStaffExtension.telnr_prv COLLATE SQL_Latin1_General_CP1_CI_AS
GROUP BY dbo.Calls_Mobile_Header.RecordStatus, dbo.HumersStaffExtension.usr_id, dbo.HumersStaffExtension.email, dbo.HumersStaffExtension.res_id,
dbo.Calls_Mobile_Header.ExtractDate
HAVING (dbo.Calls_Mobile_Header.RecordStatus = N'0') AND (NOT (dbo.HumersStaffExtension.email IS NULL))
ORDER BY dbo.HumersStaffExtension.email
Will provide me with the following results:
email ExtractDate
[email protected]
July-2014
[email protected]
August-2014
[email protected]
July-2014
[email protected]
August-2014
Is it possible to send email to [email protected] once only including in the html message body the ExtractDate field results for July-2014 and August-2014?
I appreciate any assist on the issue.
Thank you in advance.Refer the below code highlighted in bold.
USE [CallManager]
GO
/****** Object: StoredProcedure [dbo].[PersonalCallsReminder] Script Date: 08/27/2014 10:26:55 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: <Description,,>
-- =============================================
ALTER PROCEDURE [dbo].[PersonalCallsReminder]
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Email Users
declare @email varchar(max),@date datetime
declare @temp table (email varchar(50), extractDate datetime)
insert into @temp
SELECT TOP (100) PERCENT dbo.HumersStaffExtension.email, dbo.Calls_Mobile_Header.ExtractDate
FROM dbo.Calls_Mobile_Header INNER JOIN
dbo.HumersStaffExtension ON
dbo.Calls_Mobile_Header.TelNumber = dbo.HumersStaffExtension.telnr_prv COLLATE SQL_Latin1_General_CP1_CI_AS
GROUP BY dbo.Calls_Mobile_Header.RecordStatus, dbo.HumersStaffExtension.usr_id, dbo.HumersStaffExtension.email, dbo.HumersStaffExtension.res_id,
dbo.Calls_Mobile_Header.ExtractDate
HAVING (dbo.Calls_Mobile_Header.RecordStatus = N'0') AND (NOT (dbo.HumersStaffExtension.email IS NULL))
ORDER BY dbo.HumersStaffExtension.email
declare mycursor cursor FAST_FORWARD for SELECT DISTINCT email from @temp
OPEN mycursor;
FETCH NEXT FROM mycursor
INTO @email
WHILE @@FETCH_STATUS = 0
BEGIN
DECLARE @date nvarchar(200)
SELECT @date=Stuff((SELECT ',' + [extractDate]
FROM @temp where email = @email
FOR xml path('')), 1, 1, '')
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'CallsManagement',
@recipients = @email ,
@body_format = 'HTML',
@subject = 'Personal Calls Reminder',
@body = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Personal Calls Reminder</title>
<style type="text/css">
body {
font-family: "Times New Roman", Times, serif;
font-size: 11pt;
.auto-style1 {
background-color: #FFFF00;
</style>
</head>
<body>
<div>Extract Date : ' + @date + '</div>
<div>
<table style="width: 800px">
<tr>
<td>Dear,<br />
<br />
Please review your phone bills and submit your personal calls using the following link:<br />
<a href="Personal">http://companyxyz/personalcalls/">Personal Calls</a></td>
</tr>
</table>
<br/>
<table style="width: 800px">
<tr>
<td><strong>Kindly be informed that the deadline to process new bills is on the
<span class="auto-style1">15th of each month</span>.</strong></td>
</tr>
</table>
<br/>
<table style="width: 800px">
<tr>
<td>For assistance, please contact <a href="[email protected]:[email protected]">[email protected]</a></td>
</tr>
</table>
<br/>
<table style="width: 800px">
<tr>
<td><strong>*** This is an automatically generated email, please do not reply ***</strong></td>
</tr>
</table>
</div>
</body>
</html>
FETCH NEXT FROM mycursor
INTO @email
END
CLOSE mycursor;
DEALLOCATE mycursor;
END
Regards, RSingh -
Can you recommend how I can create an HTML signature for mac mail?
Can you recommend how I can create an HTML signature for mac mail?
http://matt.coneybeare.me/how-to-make-an-html-signature-in-apple-mail-for-maveri cks-os-x-10-dot-9/
Maybe you are looking for
-
Dear experts, i have a inbound scenario EDI -> XI -> R3 1. I am thinking of going the BIC mapping way like creating a BIC mappign installing in XI and specifing the mapping name in the module section of the sender file adapter as specified in this bl
-
Error 1602 when trying to update
When trying to update adobe reader it is failing to update and giving me error 1602. It says adobe will try again later. I have tried the update for roughly 1 week and it continues to fail with error message 1602.
-
How do I set up the magic trackpad when I can't access System Preferences
Bought a new iMac and Magic Mouse. After initial installation, decided to swap mouse for the Magic Trackpad. Trackpad is turned on but I am unable to access System Preferences since my iMac was paired with the Magic Mouse. I don't have another
-
Jintegra problem - accessing Matlab from Java??
Hi: Sorry if this post doesn't belong here!! I am accessing Matlab from JAVA using JIntegra for COM. I tried running the example in their website. (http://j-integra.intrinsyc.com/support/com/doc/other_examples/Matlab.htm) I have also posted the examp
-
I have a 4402 WLC. There are 2 WLAN's configured. 1 is a guest wireless lan, the other a private wireless. The guest wireless lan is wide open SSID is broadcasted. No client authentication is required. DHCP is used. When I try to ping from within the