Setting a JPEG image in Lotus Notes

pts.
Tags:
Development
Lifecycle development
Lotus Domino
Microsoft Exchange
Platform Issues
Software Quality Assurance
Good Evening Sir. Before asking about my problem- "I request to you, sir please don't ignore this mail, I request it from the core of my heart. I feel very-2 helpless for that problem since last 2 weeks. I m a software developer but new in Lotus Notes." So sir i request u to help me. Now, My problem is-----> "I have a agent in lotus script who generates a well formatted mail and send it when we run. My boss want to set a jpeg image in the background of that mail, in embedded form in place of to give URL of that image. I tried my best with whole energy but i failed, so please help me. I send u my code--->
'***********************(Code)*******
Sub Send_email
'---------------------- orignal code -------------------------------------'
'Dim FLG As Integer
'FLG=0
'If Instr(daddr,"@") <2Then
'Call send_alert("Invalid email ID", f_email)
' FLG=1
' End If
' If FLG=0 Then
' Dim session As New NotesSession
' Dim doc_email As NotesDocument
' Set doc_email = New NotesDocument(session.CurrentDatabase)
' doc_email.form = "memo"
' doc_email.from = f_email
' doc_email.sendTo = daddr
' doc_email.BlindCopyTo = eMailBCC
' doc_email.replyTo = f_email
' doc_email.Subject = "ROOM RESERVATIONS: " & res_num
' doc_email.Body = msg_txt
' doc_email.send(True)
' Call save_info
' End If
'------------------------------------------------------------------------------'

Dim FLG As Integer
FLG=0
If Instr(daddr,"@") <2Then
Call send_alert("Invalid email ID", f_email)
FLG=1
End If

If FLG=0 Then
Dim session As New NotesSession
Dim doc_email As NotesDocument
'code by mukesh
Dim body As NotesMIMEEntity
Dim header As NotesMIMEHeader '*************( Ankur )**************
Dim stream As NotesStream
session.ConvertMIME = False ' Do not convert MIME to rich text
Set stream = session.CreateStream
Dim dateofconf As String
dateofconf=date_of_conf
'-------------------------------------------------
'code by mukesh

'If ( (Mid(hid,1,3)="ITC") Or ( (Mid(hid,1,2)="ITC") ) )Then
Dim linkdb As New NotesDatabase("","") 'code for link
Dim linkview As NotesView 'code for link
Dim linkdoc As NotesDocument 'code for link

Call linkdb.Open("CHQ NOTES/Welcom","Esker4Testingpagelink.nsf") 'code for link
Set linkview=linkdb.GetView("Default") 'code for link
Set linkdoc=linkview.GetFirstDocument 'code for link
'/********************************************************/
'Changes made on 27thFEB'06 Mohit.
Dim vHotelFac, vLeisureFac, vBusinessFac, vDiningFac, vPlacesToSee, vSpecialOffers, vLocalWeather, vPublishedTarrif As String
Dim vHotelDetails ,vWelcomLinks,vContactus,vFeedback,vWelcomEnv,vInternet,vRoomRes, vSheratonLink As String

While Not(linkdoc Is Nothing)
'If ((linkdoc.hotel_id(0)= Mid(hid,1,3)) Or (linkdoc.hotel_id(0)= Mid(hid,1,2)) ) Then
If (linkdoc.hotel_id(0)= hid) Then
If(linkdoc.link(0)="Hotel facilities") Then
Dim hotel_facilities As String
If(Mid(linkdoc.page_link(0),1,29) = "http://www.welcomheritage.com" ) Then
vHotelFac=""
hotel_facilities=""
vWelcomLinks="Hide"
vSheratonLink=""
Elseif(Mid(linkdoc.page_link(0),1,32) = "http://www.fortuneparkhotels.com" ) Then
vWelcomLinks=""
vSheratonLink="Hide"
vHotelFac="Hotel Facilities >>"
hotel_facilities=linkdoc.page_link(0)
Elseif(linkdoc.page_link(0)<>"")Then
vHotelFac="Hotel Facilities >>"
hotel_facilities=linkdoc.page_link(0)
vWelcomLinks=""
vSheratonLink=""
Else
vHotelFac=""
hotel_facilities=""
vWelcomLinks=""
vSheratonLink=""
End If
End If

If(linkdoc.link(0)="Leisure facilities") Then
Dim Leisure_facilities As String
If(Mid(linkdoc.page_link(0),1,29) = "http://www.welcomheritage.com" ) Then
vLeisureFac=""
Leisure_facilities=""
vWelcomLinks="Hide"
vSheratonLink=""
Elseif(Mid(linkdoc.page_link(0),1,32) = "http://www.fortuneparkhotels.com" ) Then
vWelcomLinks=""
vSheratonLink="Hide"
vLeisureFac="Leisure Facilities >>"
Leisure_facilities=linkdoc.page_link(0)
Elseif(linkdoc.page_link(0)<>"" ) Then
vLeisureFac="Leisure Facilities >>"
Leisure_facilities=linkdoc.page_link(0)
vWelcomLinks=""
vSheratonLink=""
Else
vLeisureFac=""
Leisure_facilities=""
vWelcomLinks=""
vSheratonLink=""
End If
End If

If(linkdoc.link(0)="Business facilities") Then
Dim Business_facilities As String
If(Mid(linkdoc.page_link(0),1,29) = "http://www.welcomheritage.com" ) Then
vBusinessFac=""
Business_facilities=""
vWelcomLinks="Hide"
vSheratonLink=""
Elseif(Mid(linkdoc.page_link(0),1,32) = "http://www.fortuneparkhotels.com" ) Then
vWelcomLinks=""
vSheratonLink="Hide"
vBusinessFac="Business Facilities >>"
Business_facilities=linkdoc.page_link(0)
Elseif(linkdoc.page_link(0)<>"" ) Then
vBusinessFac="Business Facilities >>"
Business_facilities=linkdoc.page_link(0)
vWelcomLinks=""
vSheratonLink=""
Else
vBusinessFac=""
Business_facilities=""
vWelcomLinks=""
vSheratonLink=""
End If
End If

If(linkdoc.link(0)="Dining facilities") Then
Dim Dining_facilities As String
If(Mid(linkdoc.page_link(0),1,29) = "http://www.welcomheritage.com" ) Then
vDiningFac=""
Dining_facilities=""
vWelcomLinks="Hide"
vSheratonLink=""
Elseif(Mid(linkdoc.page_link(0),1,32) = "http://www.fortuneparkhotels.com" ) Then
vWelcomLinks=""
vSheratonLink="Hide"
vDiningFac="Dining Facilities >>"
Dining_facilities=linkdoc.page_link(0)
Elseif(linkdoc.page_link(0)<>"" ) Then
vDiningFac="Dining Facilities >>"
Dining_facilities=linkdoc.page_link(0)
vWelcomLinks=""
vSheratonLink=""
Else
vDiningFac=""
Dining_facilities=""
vWelcomLinks=""
vSheratonLink=""
End If
End If

If(linkdoc.link(0)="Places to see") Then
Dim Places_to_see As String
If(Mid(linkdoc.page_link(0),1,29) = "http://www.welcomheritage.com" ) Then
vPlacesToSee=""
Places_to_see=""
vWelcomLinks="Hide"
vSheratonLink=""
Elseif(Mid(linkdoc.page_link(0),1,32) = "http://www.fortuneparkhotels.com" ) Then
vWelcomLinks=""
vSheratonLink="Hide"
vPlacesToSee="Places To See >>"
Places_to_see=linkdoc.page_link(0)
Elseif(linkdoc.page_link(0)<>"" ) Then
vPlacesToSee="Places To See >>"
Places_to_see=linkdoc.page_link(0)
vWelcomLinks=""
vSheratonLink=""
Else
vPlacesToSee=""
Places_to_see=""
vWelcomLinks=""
End If
End If

If(linkdoc.link(0)="Special Offers") Then
Dim Special_Offers As String
If(Mid(linkdoc.page_link(0),1,29) = "http://www.welcomheritage. com" ) Then
vSpecialOffers=""
Special_Offers=""
vWelcomLinks="Hide"
vSheratonLink=""
Elseif(Mid(linkdoc.page_link(0),1,32) = "http://www.fortuneparkhotels.com" ) Then
vWelcomLinks=""
vSheratonLink="Hide"
vSpecialOffers="Special Offers >>"
Special_Offers=linkdoc.page_link(0)
Elseif(linkdoc.page_link(0)<>"")Then
vSpecialOffers="Special Offers >>"
Special_Offers=linkdoc.page_link(0)
vWelcomLinks=""
vSheratonLink=""
Else
vSpecialOffers=""
Special_Offers=""
vWelcomLinks=""
vSheratonLink=""
End If
End If

If(linkdoc.link(0)="Local weather") Then
Dim Local_weather As String
If(Mid(linkdoc.page_link(0),1,29) = "http://www.welcomheritage.com") Then
vLocalWeather=""
Local_weather=""
vWelcomLinks="Hide"
vSheratonLink=""
Elseif(Mid(linkdoc.page_link(0),1,32) = "http://www.fortuneparkhotels.com" ) Then
vWelcomLinks=""
vSheratonLink="Hide"
vLocalWeather="Local Weather >>"
Local_weather=linkdoc.page_link(0)
Elseif(linkdoc.page_link(0)<>"")Then
vLocalWeather="Local Weather >>"
Local_weather=linkdoc.page_link(0)
vWelcomLinks=""
vSheratonLink=""
Else
vLocalWeather=""
Local_weather=""
vWelcomLinks=""
vSheratonLink=""
End If
End If

If(linkdoc.link(0)="Hotel Details") Then
Dim Hotel_Details As String
If(Mid(linkdoc.page_link(0),1,29) = "http://www.welcomheritage.com") Then
Hotel_Details=linkdoc.page_link(0)
vWelcomLinks="Hide"
vSheratonLink=""
Elseif(Mid(linkdoc.page_link(0),1,32) = "http://www.fortuneparkhotels.com" ) Then
Hotel_Details=linkdoc.page_link(0)
vWelcomLinks=""
vSheratonLink="Hide"
Elseif(linkdoc.page_link(0)<>"")Then
Hotel_Details=linkdoc.page_link(0)
vWelcomLinks=""
vSheratonLink=""
Else
Hotel_Details="#"
vWelcomLinks=""
vSheratonLink=""
End If
End If

If(linkdoc.link(0)="Contact us") Then
Dim Contact_us As String
If(Mid(linkdoc.page_link(0),1,29) = "http://www.welcomheritage.com") Then
vWelcomLinks="Hide"
Contact_us=linkdoc.page_link(0)
vSheratonLink=""
Elseif(Mid(linkdoc.page_link(0),1,32) = "http://www.fortuneparkhotels.com" ) Then
vWelcomLinks=""
vSheratonLink="Hide"
Contact_us=linkdoc.page_link(0)
Elseif(linkdoc.page_link(0)<>"")Then
Contact_us=linkdoc.page_link(0)
vWelcomLinks=""
vSheratonLink=""
Else
Contact_us="#"
vWelcomLinks=""
vSheratonLink=""
End If
End If

If(linkdoc.link(0)="Feedback") Then
Dim Feedback As String
If(Mid(linkdoc.page_link(0),1,29) = "http://www.welcomheritage.com") Then
vWelcomLinks="Hide"
Feedback=linkdoc.page_link(0)
vSheratonLink=""
Elseif(Mid(linkdoc.page_link(0),1,32) = "http://www.fortuneparkhotels.com" ) Then
vWelcomLinks=""
vSheratonLink="Hide"
Feedback=linkdoc.page_link(0)
Elseif(linkdoc.page_link(0)<>"")Then
Feedback=linkdoc.page_link(0)
vWelcomLinks=""
vSheratonLink=""
Else
Feedback="#"
vWelcomLinks=""
vSheratonLink=""
End If
End If
'/********************************************************/
'26dec2006

'/********************************************************/
If(linkdoc.link(0)="Published Tarriff") Then
Dim Published_Tarrif As String
If(Mid(linkdoc.page_link(0),1,29) = "http://www.welcomheritage.com") Then
vWelcomLinks="Hide"
Published_Tarrif =linkdoc.page_link(0)
vSheratonLink=""
vPublishedTarrif="Published Tariff >>"
Elseif(Mid(linkdoc.page_link(0),1,32) = "http://www.fortuneparkhotels.com" ) Then
vWelcomLinks=""
vSheratonLink="Hide"
Published_Tarrif =linkdoc.page_link(0)
vPublishedTarrif="Published Tariff >>"
Elseif(linkdoc.page_link(0)<>"")Then
Published_Tarrif =linkdoc.page_link(0)
vWelcomLinks=""
vSheratonLink=""
vPublishedTarrif="Published Tariff >>"
Else
Published_Tarrif ="#"
vWelcomLinks=""
vSheratonLink=""
vPublishedTarrif="Published Tariff >>"
End If
End If
' If(linkdoc.link(0)="Welcom Environment") Then
' Dim WelcomEnv As String
' If(Mid(linkdoc.page_link(0),1,29) = "http://www.welcomheritage.com") Then
' vWelcomLinks="Hide"
' WelcomEnv=linkdoc.page_link(0)
' Elseif(linkdoc.page_link(0)<>"")Then
' WelcomEnv=linkdoc.page_link(0)
' vWelcomLinks=""
' Else
' WelcomEnv="#"
' vWelcomLinks=""
' End If
' ' Else
' ' WelcomEnv="#"
' End If

' If(linkdoc.link(0)="Internet Access") Then
' Dim Internet As String
' If(Mid(linkdoc.page_link(0),1,29) = "http://www.welcomheritage.com") Then
' vWelcomLinks="Hide"
' Internet=linkdoc.page_link(0)
' Elseif(linkdoc.page_link(0)<>"")Then
' Internet=linkdoc.page_link(0)
' vWelcomLinks=""
' Else
' Internet="#"
' vWelcomLinks=""
' End If
' ' Else
' Internet="#"
' End If

If(linkdoc.link(0)="Room Reservation") Then
Dim Room_Res As String
If(Mid(linkdoc.page_link(0),1,29) = "http://www.welcomheritage.com") Then
vWelcomLinks="Hide"
Room_Res=linkdoc.page_link(0)
vSheratonLink=""
Elseif(Mid(linkdoc.page_link(0),1,32) = "http://www.fortuneparkhotels.com" ) Then
vWelcomLinks=""
vSheratonLink="Hide"
Room_Res=linkdoc.page_link(0)
Elseif(linkdoc.page_link(0)<>"")Then
Room_Res=linkdoc.page_link(0)
vWelcomLinks=""
vSheratonLink=""
Else
Room_Res="#"
vWelcomLinks=""
vSheratonLink=""
End If
End If

End If
Set linkdoc=linkview.GetNextDocument(linkdoc)

Wend

Set linkdoc=Nothing

Dim vartag As String

If(tag="$" Or tag="D") Then
vartag="Dollar"
Elseif (tag="R") Then
vartag="Rupees"
Else
vartag="Rupees"
End If

'/*********************/
'Mail Attachment
Call Click()
'/*********************/
'/* Arrival details */
'/*********************/
Dim vArrDetails As String
If (arrival_details = "")Then
vArrDetails="Awaited"
Else
vArrDetails=arrival_details
End If
'code by mukesh
'End If
'----------------------------------------------------
'Dim AttachME As NotesRichTextItem
'Dim EmbedObj As NotesEmbeddedObject
'Dim Attachment As String
'Attachment = "msg_txt"
'-------------------------------------------------
Set doc_email = New NotesDocument(session.CurrentDatabase)

'f_email="lata.rana@itcwelcomgroup.in"
Set body = doc_email.CreateMIMEEntity 'code by mukesh
Set header = body.CreateHeader("Content-Disposition")
Call header.SetHeaderVal("inline; filename=logo1")
Set header = body.CreateHeader("Content-ID")
header.SetHeaderVal("logo1")
Set header = body.CreateHeader("Content-Transfer-Encoding")
Call header.SetHeaderVal("Base64")
'Set stream = ses.CreateStream()
FileName = "D:Temp1000a.jpg"
Call stream.Open(FileName)
Call body.SetContentFromBytes(stream,"image/jpeg", ENC_IDENTITY_BINARY)
Call body.EncodeContent(ENC_BASE64)
Call stream.close

doc_email.form = "memo"
doc_email.from = f_email
'doc_email.sendTo = daddr
doc_email.BlindCopyTo = eMailBCC
doc_email.replyTo = f_email
doc_email.Subject = hotel_id & " / ROOM RESERVATION NO.:" & res_num

'/**********************************************************************
Const EMBED_ATTACHMENT = 1454
'Set up the embedded object and attachment and attach it
Dim sAttachment As String
Dim AttachME As NotesRichTextItem
Dim EmbedObj As NotesEmbeddedObject
sAttachment = "D:Temp1000a.jpg"

Set AttachME = doc_email.CreateRichTextItem("Attachment")

Set EmbedObj = AttachME.EmbedObject (EMBED_ATTACHMENT, "", sAttachment, "Attachment")
'/**********************************************************************
'doc_email.Body = msg_txt color: #000000;CCCCCC
'attachfile=True
'doc_email.attachments = "Z:AttachmentDATA.TXT"
' Open the HTML (Title doesn't matter since it doesn't appear anywhere)

Call stream.writetext(|<html>|)
Call stream.writetext(|<head>|)
Call stream.writetext(|<style type="text/css">|)
Call stream.writetext(| .style1 {font-weight:Bold;font-family:Verdana;font-size:13px;color:#FFFFFF;}|)
Call stream.writetext(| .style2 {font-family:Verdana;font-size:13px;color:#000000;}|)
Call stream.writetext(| .style3 {font-family:Verdana;font-size:13px;color:#CCCCCC;}|)
Call stream.writetext(| .style4 {font-family:Verdana;font-size:13px;color:#000000;}|)
Call stream.writetext(| .style5 {padding-right:50px;}|)
Call stream.writetext(| .style6 {font-family:Verdana;font-size:10px;padding-right:50px;}|)
Call stream.writetext(| </style>|)
Call stream.writetext(|</head>|)
Call stream.writetext(|<body background='cid:logo1'>|)
Call stream.writetext(|<img src='cid:logo1'>|)
Call stream.writetext(|</img>|)
Call stream.writetext(|<table width="100%" border="0" cellspacing="0" cellpadding="0">|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td colspan="2" valign=top><table width="100%" border="0">|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style6">* If you cannot view this message clearly, kindly open the attached document at the bottom.</td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| </table></td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td colspan="2" valign=top><table width="100%" border="0" bgcolor="#570000">|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style1">| & hotel_id$ & | >></td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr>|)
Call stream.writetext(| <td class="style1">Confirmation Number : | & res_num$ & |</td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| </table></td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr><td height=10> </td></tr> |)
Call stream.writetext(| <tr> |)'#fff5e3
Call stream.writetext(| <td width="60%" valign=top><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#dec4b5">|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2" valign=top width=120><strong>Address:</strong></td>|)
Call stream.writetext(| <td class="style2" valign=top>| & hotel_add$ & |</td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2" valign=top width=120><strong>Phone    : </strong></td>|)
Call stream.writetext(| <td class="style2" valign=top >| & hotel_phone$ & |</td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2" valign=top width=120><strong>Fax        : </strong></td>|)
Call stream.writetext(| <td class="style2" valign=top >| & hotel_fax$ & |</td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2" valign=top width=120><strong>Email     : </strong></td>|)
Call stream.writetext(| <td class="style2" valign=top >| & Email_ID$ & |</td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| </table></td>|)
Call stream.writetext(| <td width="40%" valign=top align=left><table border="0" cellspacing=0>|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2" valign=top><a href="|& Hotel_Details &|">Hotel Details >></a> </td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| </table></td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr><td height=10> </td></tr> |)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td width="70%" class="style2" valign=top><table width="100%" border="0" cellspacing="0" cellpadding="0">|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2"><strong>Dear </strong><strong>| & cname$ & | , </strong><br>|)
Call stream.writetext(| We are delighted to confirm your Room Reservation with<br> |)
Call stream.writetext(| <strong>| & hotel_id$ & | </strong>.</td><br>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr>|)
Call stream.writetext(| <td class="style2">|)
Call stream.writetext(| Below is a summary of your booking and room information. We look forward|)
Call stream.writetext(| to making your stay as unique, as comfortable and as memorable as possible.|)
Call stream.writetext(| </td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| </table></td>|)
Call stream.writetext(| <td class="style2" width="30%" valign=top><table width="100%" border="0" cellspacing="0" cellpadding="0">|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2" valign=top>You Can Modify Or Cancel This Room|)
Call stream.writetext(| </td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2" valign=top>Reservation.Call us at:|)
Call stream.writetext(| </td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2" valign=top>|)
Call stream.writetext(| 1-800-111333(BSNL/MTNL-Subscribers)</td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2" valign=top>|)
Call stream.writetext(| 1-800-1022333(Airtel-Subscribers)</td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| </table></td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr><td height=10> </td></tr> |)

'------------------ "Room Reservation"
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td width="40%" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" >|)
Call stream.writetext(| <tr bgcolor="#dec4b5"> |)
Call stream.writetext(| <td colspan="2" class="style1"><strong>Your Room Reservation </strong></td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td colspan="2" class="style2"><strong>Confirmation # : </strong>| & res_num$ & |</td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2"><strong>Date Of Arrival : </strong>| & dt_arrival$ & |</td>|)
Call stream.writetext(| <td class="style2"><strong>Date Of Departure : </strong> | & dt_dep$ & |</td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| </table></td>|)
Call stream.writetext(| <td width="60%" valign=top>|)
If(vWelcomLinks="")Then
Call stream.writetext(| <table width="100%" border="0" cellspacing="0" cellpadding="0">|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2"><strong><br>|)
Call stream.writetext(| ITC Welcomgroup Loyalty Programs</strong> <br>|)
Call stream.writetext(| Not a member? Earn points for each stay.<br> |)
Call stream.writetext(| <a href="http://itcwelcomgroup.in/Loyalty/loyaltymain.asp#WA">WelcomAward >></a><br> |)
Call stream.writetext(| <a href="http://itcwelcomgroup.in/Loyalty/loyaltymain.asp#WL">WelcomLink >></a><br> |)
If (vSheratonLink="")Then
Call stream.writetext(| <a href="http://itcwelcomgroup.in/Loyalty/loyaltymain.asp#SP">Sheraton Plus >></a> |)
End If
Call stream.writetext(| </td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| </table>|)
End If
Call stream.writetext(| </td>|)
Call stream.writetext(| </tr>|)
'Call stream.writetext(| <tr> |)
'Call stream.writetext(| <td class="style2"></td>|)
'Call stream.writetext(| <td class="style2"></td>|)
'Call stream.writetext(| </tr>|)
'Call stream.writetext(| <tr> |)
'Call stream.writetext(| <td class="style2"></td>|)
'Call stream.writetext(| <td class="style2"></td>|)
'Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr>|)
Call stream.writetext(| <td width="40%" valign=top><table width="100%" border="0" cellspacing="0" cellpadding="0">|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2">Question about this Room Reservation?<br> |)
Call stream.writetext(| <a href="|& Contact_us &|">Contact Us >></a></td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| </table></td>|)
Call stream.writetext(| <td width="60%"></td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr><td height=5></td></tr> |)
'_____________ Arrival / departure details
Call stream.writetext(| <tr>|)
Call stream.writetext(| <td width="40%" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" >|)
'If Not(arrival_details="")Then
Call stream.writetext(| <tr bgcolor="#dec4b5"> |)
Call stream.writetext(| <td colspan="2" class="style1"><strong>Your Arrival / Departure Details </strong></td>|)
Call stream.writetext(| </tr>|)

Dim ArrDetBlock As Variant

Dim ArrF_Tno, ArrTime, ArrPicComment As String
If Not arrival_details="" Then
arrdetblock=Split(arrival_details,"|")
If(arrdetblock(2)="") Then
ArrF_Tno="Awaited"
ArrTime=""
ArrPicComment=""
Else
ArrF_Tno=arrdetblock(2)
ArrTime=arrdetblock(3)
ArrPicComment=arrdetblock(4)
End If
Else
ArrF_Tno="Awaited"
ArrTime=""
ArrPicComment=""
End If

Dim arrDepDet As Variant

Dim DepF_Tno,DepTime, DepPicComment As String
If Not dep_details="" Then
arrDepDet=Split(dep_details,"|")
If(arrDepDet(2)="") Then
DepF_Tno="Awaited"
DepTime=""
DepPicComment=""
Else
DepF_Tno=arrDepDet(2)
DepTime=arrDepDet(3)
DepPicComment=arrDepDet(4)
End If
Else
DepF_Tno="Awaited"
DepTime=""
DepPicComment=""
End If

Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2"><strong>Arrival Flight Number : </strong>| & ArrF_Tno & |</td>|)
Call stream.writetext(| <td class="style2"><strong>Departure Flight Number : </strong>| & DepF_Tno & |</td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2"><strong>Time : </strong>| & ArrTime & |</td>|)
Call stream.writetext(| <td class="style2"><strong>Time : </strong>| & DepTime & |</td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2"><strong>Comments : </strong>| & ArrPicComment & |</td>|)
Call stream.writetext(| <td class="style2"><strong>Comments : </strong>| & DepPicComment & |</td>|)
Call stream.writetext(| </tr>|)
'Else
' Call stream.writetext(| <tr> |)
' Call stream.writetext(| <td class="style2"><strong>Arrival Details : </strong>Awaited</td>|)
' Call stream.writetext(| <td class="style2"></td>|)
' Call stream.writetext(| </tr>|)
'End If

Call stream.writetext(| </table></td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr><td height=5></td></tr> |)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td width="40%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">|)
Call stream.writetext(| <tr bgcolor="#dec4b5"> |)
Call stream.writetext(| <td colspan="2" class="style1"><strong>Your Room</strong></td>|)
Call stream.writetext(| </tr>|)

Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2"><strong>You Have Requested : </strong>| & num_rooms% & |</td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2"><strong>Room Type : </strong>| & room_code$ & |</td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2"><strong>Guests In Room : </strong>| & num_adults% & |</td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2"><strong>Guests Name: </strong> | & cname$ & |</td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2"><strong>Company Name: </strong> | & comp$ & |</td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| </table></td>|)
Call stream.writetext(| <td width="60%" valign=top><table width="100%" border="0">|)
If(vHotelFac <> "")Then
Call stream.writetext(| <tr class="style2"> |)
Call stream.writetext(| <td><br> <br> <a href= " | & hotel_facilities & |">|& vHotelFac &|</a></td>|)
Call stream.writetext(| </tr>|)
End If
If(vLeisureFac <> "")Then
Call stream.writetext(| <tr class="style2"> |)
Call stream.writetext(| <td><a href=" | & Leisure_facilities & |">| & vLeisureFac &|</a> |)
Call stream.writetext(| </td>|)
Call stream.writetext(| </tr>|)
End If
If(vBusinessFac<>"")Then
Call stream.writetext(| <tr class="style2"> |)
Call stream.writetext(| <td><a href=" | & Business_facilities & |">| & vBusinessFac &|</a></td>|)
Call stream.writetext(| </tr>|)
End If
If(vDiningFac<>"")Then
Call stream.writetext(| <tr class="style2"> |)
Call stream.writetext(| <td><a href=" | & Dining_facilities & |">|& vDiningFac &|</a></td>|)
Call stream.writetext(| </tr>|)
End If
If(vPlacesToSee<>"")Then
Call stream.writetext(| <tr class="style2">|)
Call stream.writetext(| <td><a href=" | & Places_to_see & |">|& vPlacesToSee &|</a> </td>|)
Call stream.writetext(| </tr>|)
End If
If(vSpecialOffers<>"")Then
Call stream.writetext(| <tr class="style2"> |)
Call stream.writetext(| <td><a href=" | & Special_Offers & |">| & vSpecialOffers &|</a> </td>|)
Call stream.writetext(| </tr>|)
End If
If(vLocalWeather <> "")Then
Call stream.writetext(| <tr class="style2"> |)
Call stream.writetext(| <td><a href=" | & Local_weather & |">|& vLocalweather &|</a> </td>|)
Call stream.writetext(| </tr>|)
End If
If(vPublishedTarrif <> "")Then
Call stream.writetext(| <tr class="style2"> |)
Call stream.writetext(| <td><a href=" | & Published_Tarrif & |">|& vPublishedTarrif &|</a> </td>|)
Call stream.writetext(| </tr>|)
End If
'Call stream.writetext(| <tr> |)
'Call stream.writetext(| <td class="style2">This hotel features<br> |)
'Call stream.writetext(| <a href="|& Internet &|">High-Speed Internet access >> </a></td>|)
'Call stream.writetext(| </tr>|)
Call stream.writetext(| </table></td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td width="40%" class="style2" valign=top><table width="100%" border="0">|)
Call stream.writetext(| <tr bgcolor="#dec4b5"> |)
Call stream.writetext(| <td colspan="2" class="style1"><strong>Rate Information </strong></td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2"><strong>Rate: </strong>| & vartag$ &| | & room_rate$ & |</td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| </table></td>|)
Call stream.writetext(| <td width="60%" class="style2"><br><br><a href="|& Room_Res &|">Make Another Room Reservation >></a></td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td width="40%"></td>|)
Call stream.writetext(| <td width="60%" class="style2"><a href="|& Feedback &|">Feedback >></a></td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2"></td>|)
Call stream.writetext(| <td class="style2"></td>|)
Call stream.writetext(| </tr>|)
'/***** 19sep'06******/

'------------------ end of "Your Room Reservation"

Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2"></td>|)
'Call stream.writetext(| <td class="style2"></td>|)
Call stream.writetext(| </tr>|)
'-----------------
'/******************************************************/
'/*--------------- Additional Information -------------------*/
'/******************************************************/
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td width="40%" class="style2" valign=top><table width="100%" border="0">|)
Call stream.writetext(| <tr bgcolor="#dec4b5"> |)
Call stream.writetext(| <td colspan="2" class="style1"><strong>Additional Information </strong></td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr>|)
Call stream.writetext(| <td class="style2"><strong>WA Number     : </strong>| & card_num$ & |</td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr>|)
Call stream.writetext(| <td class="style2"><strong>SPG Number    : </strong>| & SPG_NO$ & |</td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr>|)
Call stream.writetext(| <td class="style2"></td>|)
Call stream.writetext(| </tr>|)
If Not(comment1="")Then
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2"><strong>* </strong>| & comment1$ &|</td>|)
Call stream.writetext(| </tr>|)
Else
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2"><strong></strong>| & comment1$ &|</td>|)
Call stream.writetext(| </tr>|)
End If
If Not(comment2="")Then
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2"><strong>* </strong>| & comment2$ &|</td>|)
Call stream.writetext(| </tr>|)
Else
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2"><strong></strong>| & comment2$ &|</td>|)
Call stream.writetext(| </tr>|)
End If
Call stream.writetext(| </table></td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2"></td>|)
'Call stream.writetext(| <td class="style2"></td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td class="style2"></td>|)
'Call stream.writetext(| <td class="style2"></td>|)
Call stream.writetext(| </tr>|)
'/******************************************************/
'/*--------------- End of Additional Information ----------*/
'/******************************************************/

'/**********************/
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td colspan="2" align="center" class="style2" valign=top><a href="http://www.itcwelcomgroup.in/Others/Others.asp?code=WE&refLnk=6">WelcomEnviron >></a></td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td colspan="2" width="100%" style="padding-right:50px"><table width=100% class="style4" cellpadding=5><tr><td><strong>Terms Of Stay</strong></td><td> </td></tr> |)
Call stream.writetext(| <tr><td><p align="justify">The hotel's check in, check out time is 12 00 hours. While every effort will be made, you will appreciate that late check out and early check in is subject to availability.Check outs after |)
Call stream.writetext(| 16 00 hours are subject to charge, as are all arrivals prior to 08 00 hours, which are billed from the previous night.</p>|)
Call stream.WriteText(| </td><td> </td></tr>|)
'Call stream.WriteText(| <tr><td> </td</tr>|)
Call stream.writetext(| <tr><td><p align="justify">The room tariff mentioned above is applicable per room per night. Taxes, service charges and |)
Call stream.writetext(| other levies are additional wherever applicable.</p>|)
Call stream.WriteText(| </td><td> </td></tr>|)
'Call stream.WriteText(| <tr><td> </td</tr>|)
Call stream.writetext(| <tr><td><p align="justify">The room tariff is not inclusive of airport transfer. However should you require any facilitation for |)
Call stream.writetext(| the same please feel free to contact us.</p>|)
Call stream.WriteText(| </td><td> </td></tr>|)
'Call stream.WriteText(| <tr><td> </td</tr>|)
Call stream.writetext(| <tr><td><p align="justify">May we request you to guarantee your reservation against Credit Card deposit. Companies with credit |)
Call stream.writetext(| facility can guarantee reservations by sending a billing letter duly signed by an authorized person. You will appreciate |)
Call stream.writetext(| that the hotel reserves the right to cancel non guaranteed reservations after 18 00 hours on the day of arrival.</p>|)
Call stream.WriteText(| </td><td> </td></tr>|)
'Call stream.WriteText(| <tr><td> </td</tr>|)
Call stream.writetext(| <tr><td><p align="justify">Guaranteed Room Reservations not cancelled 48 hours prior to arrival would attract a retention charge |)
Call stream.writetext(| equivalent to one night's room tariff.</p>|)
Call stream.WriteText(| </td><td> </td></tr>|)
'Call stream.WriteText(| <tr><td> </td</tr>|)
Call stream.writetext(| <tr><td><p align="justify">In the event of a cancellation, 48 hours beyond scheduled arrival, please do retain the cancellation number to ensure that |)
Call stream.writetext(| no retention charge is levied.</p>|)
Call stream.WriteText(| </td><td> </td></tr>|)
'Call stream.WriteText(| <tr><td> </td</tr>|)
Call stream.writetext(| <tr><td><p align="justify">Guests are requested to settle their bills directly at the time of check out. We are not in a position to accept personal cheques and a signing |)
Call stream.writetext(| facility is extended only to those corporate accounts which have a credit facility with the respective hotel.</p>|)
Call stream.WriteText(| </td><td> </td></tr>|)
'Call stream.WriteText(| <tr><td> </td</tr>|)
Call stream.writetext(| <tr><td><p align="justify">Prior information for a Smoking or Non Smoking Room will enable us to provide on priority, subject to availability. </p>|)
Call stream.WriteText(| </td><td> </td></tr>|)
'Call stream.WriteText(| <tr><td> </td</tr>|)
Call stream.writetext(| <tr><td><p align="justify">Room Reservations for referral hotels are on behalf of their owners ( as per their terms and conditions ). ITC Welcomgroup assumes |)
Call stream.writetext(| no responsibility for the quality of service and facilities provided by these hotels. All correspondence regarding accommodation, facilities |)
Call stream.writetext(| and amenities should be addressed directly to the hotels concerned.</p></td><td> </td></tr></table></td>|)
Call stream.writetext(| </tr>|)
Call stream.writetext(| <tr> |)
Call stream.writetext(| <td colspan="2" width="100%" valign=top><table class="style4" width=100% cellpadding=5><tr><td><strong>Disclaimer</strong></td><td> </td></tr>|)
Call stream.writetext(| <tr><td><p align="justify">This Communication is for the exclusive use of the intended recipient(s) and shall not attach any liability |)
Call stream.writetext(| on the originator or ITC Ltd./its Subsidiaries/its Group Companies. If you are the addressee, the|)
Call stream.writetext(| contents of this email are intended for your use only and it shall not be forwarded to any third party, |)
Call stream.writetext(| without first obtaining written authorisation from the originator or ITC Ltd./its Subsidiaries/its Group |)
Call stream.writetext(| Companies. It may contain information which is confidential and legally privileged and the same shall |)
Call stream.writetext(| not be used or dealt with by any third party in any manner whatsoever without the specific consent of |)
Call stream.writetext(| ITC Ltd./its Subsidiaries/ its Group Companies.</p> </td><td> </td></tr></table></td> |)
Call stream.writetext(| </tr>|)
Call stream.writetext(|</table>|)
Call stream.writetext(|</body>|)
Call stream.writetext(|</html>|)
Call body.SetContentFromText(stream, "text/HTML;charset=UTF-8", ENC_IDENTITY_7BIT)

'Call stream.close ''*********( Ankur )
Call doc_email.Save(True,True)
doc_email.send(False)
session.ConvertMIME = True ' Restore conversion
Call save_info
End If

End Sub

'*****************************
Please-2222, modify it. I will very-222 thankfull to u sir. My email ID is "ankur_pri@india.com" and "ankur.pri@gmail.com" Sir, once again please don't ignore this mail. Please send me your reply as soon as possible. Very-2 Thanks. Ankur 919868973496.

Answer Wiki

Thanks. We'll let you know when a new response is added.

I have not reviewed your code, but I have a couple questions.

Is the email being read in Notes, or someting else (like Outlook)?

If it’s being read in Notes, is it being read as Notes Rich Text, or MIME?

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • shivasanjay
    Interesting, it uses MIMe, I havn't worked on it,.any one has any answer? 
    2,425 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following