tolong dibantu karena saya mencoba mengirimkan email secara otomatis dengan
menggunakan dts Sqlserver, tapi tidak bisa keluar gambar pada email yang
diterima (hanya tulisan saja)
dengan script seperti ini...
Function Main()
Dim strFrom
Dim strTo
Dim strCC
Dim strSubject
Dim strBody 'Strings for recipient, subject, boby
Dim objMessage 'The CDO object
Dim strAttachment
'First we'll read in the values entered from the form into the Local variables
strFrom = DTSGlobalVariables("gv_MailFrom").Value
strTo = DTSGlobalVariables("gv_MailTo").Value
strCC = DTSGlobalVariables("gv_MailCC").Value
strSubject = DTSGlobalVariables("gv_MailSubject").Value
DTSGlobalVariables("gv_MailBody").Value = "<html><body><font
color='0E3FC0'><h2>* INFOCUBE_DIM_SITE_" &
DTSGlobalVariables("gv_Principal").value & " Date. " &
DTSGlobalVariables("gdtDay").value & " *</h2></font></br> " & _
"<h4><font
color='#009933'>Berikut kami kirimkan data dim_site_nvo per tgl. " &
DTSGlobalVariables("gdtDay").value & " </font></h4></br>" &_
"<h4><font color='#FF5300'>Salam, </br>MIS
Aam</font></h4></br><p></p><strong>Powered by</strong></br><strong><font
color='#999999'>Info</font><font color='#000000'>st</font><font
color='#FF0000'>e</font><font color='#000000'>p</font></strong></br><p><img
border='0' src='d:/AAM_INFOCUBE/infostep.gif' width='480'
height='386'></p></body></html>"
strBody = DTSGlobalVariables("gv_MailBody").Value
strAttachment = DTSGlobalVariables("gv_FileLocation").Value & "pis_dimSite_" &
DTSGlobalVariables("gv_Principal").value & "_" &
DTSGlobalVariables("gdtDay").value & ".zip"
' Create an instance of the NewMail object.
Set objMessage = CreateObject("CDO.Message")
' Set the properties of the object
' Mime Format 0 attachment bisa di download
objMessage.Subject = strSubject
objMessage.From = StrFrom
'objMessage.Sender = StrFrom
objMessage.To = strTo
objMessage.Cc = strCC
objMessage.HTMLBody = strBody
objMessage.AddAttachment strAttachment
'==This section provides the configuration information for the remote SMTP
server.
'==Normally you will only change the server name or IP.
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") =
'Name or IP of Remote SMTP Server
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
'Server port (typically 25)
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") =
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") =
objMessage.Configuration.Fields.Update
'==End remote SMTP server configuration section==
objMessage.Send
' Set the object to nothing because it immediately becomes
' invalid after calling the Send method + it clears it out of the Server's
Memory.
Set objMessage = Nothing
'SendEmail="True"
Main = DTSTaskExecResult_Success
End Function
tulisan yang berwarna ungu adalah massage body berupa html, masalahnya kenapa
gambar tidak bisa muncul pada body email..? (yang berhuruf warna merah)
The contents of this e-mail may be confidential and the unauthorized use,
copying, or dissemination of it and any attachments to it, is prohibited.
Internet communications are not secure and Dexa Group companies do not,
therefore, accept legal responsibility for the contents of this message nor
for any damage caused by viruses. The views expressed here do not necessarily
represent those of Dexa Group companies.
[Non-text portions of this message have been removed]
--
www.ITCENTER.or.id - Komunitas Teknologi Informasi Indonesia
Info, Gabung, Keluar, Mode Kirim : [EMAIL PROTECTED]
::: Hapus bagian yang tidak perlu (footer, dst) saat reply! :::
## Jobs: itcenter.or.id/jobs ## Bursa: itcenter.or.id/bursa ##
$$ Iklan/promosi : www.itcenter.or.id/sponsorship $$
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ITCENTER/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/