meatsack Posted February 19, 2010 Posted February 19, 2010 I want to take my data in array format and write it to the $Body variable. Is their anything to prevent this variable from holding an array? _INetSmtpMailCom($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $AttachFiles, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl) It appears to my novice eyes that some string processing is occuring and arrays are not strings or at least may need to be converted before being used as a string, no? Func _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $s_Importance="Normal", $s_Username = "", $s_Password = "", $IPPort = 25, $ssl = 0) Local $objEmail = ObjCreate("CDO.Message") $objEmail.From = '"' & $s_FromName & '" <' & $s_FromAddress & '>' $objEmail.To = $s_ToAddress Local $i_Error = 0 Local $i_Error_desciption = "" If $s_CcAddress <> "" Then $objEmail.Cc = $s_CcAddress If $s_BccAddress <> "" Then $objEmail.Bcc = $s_BccAddress $objEmail.Subject = $s_Subject If StringInStr($as_Body, "<") And StringInStr($as_Body, ">") Then $objEmail.HTMLBody = $as_Body Else $objEmail.Textbody = $as_Body & @CRLF EndIf The last thing I have been doing with my data is attempting to write it to a array variable: $aArray = _ExcelReadSheetToArray($oExcel, 2, 2, 3, 3) .
PsaltyDS Posted February 19, 2010 Posted February 19, 2010 The only problem with passing the array from _ExcelReadSheetToArray() into _INetSmtpMailCom() as $as_Body is 2D vice 1D arrays. So process the 2D sheet array and make each row a delimited string of columns, into a 1D array, passing that to $as_Body. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
meatsack Posted February 19, 2010 Author Posted February 19, 2010 The only problem with passing the array from _ExcelReadSheetToArray() into _INetSmtpMailCom() as $as_Body is 2D vice 1D arrays. So process the 2D sheet array and make each row a delimited string of columns, into a 1D array, passing that to $as_Body.Dang, I knew their was a problem. Great I will try that. If this works out I might have a script that is like one of those search engines by email type of processes. That's useful for cheap smartphone users who don't want to pay $30.00 a month for a data plan, ha ha ah ha. Thanks again.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now