mfrom="[email protected]" rcpt="[email protected], [email protected]" attachfile=null serverip="smtp.abcd.com" sbj="Subject" tbody="Hello World" Call SendMail(mfrom,rcpt,sbj,tbody,attachfile,serverIP)
Sub SendMail (mfrom,rcpt,sbj,tbody,attachfile,serverIP)
'######### call SendMail (mfrom,rcpt,cc,sbj,tbody,serverIP) ##################
'Use external smtp server to send mail
if trim(rcpt) = "" or trim(mfrom) = "" then
exit sub
end if
On Error Resume Next
Set objEmail = CreateObject("CDO.Message")
objEmail.From = mfrom
objEmail.To = rcpt
' objEmail.Cc = cc
&#