jaberwacky Posted September 23, 2010 Share Posted September 23, 2010 (edited) Is this a bug? If Number($IPPort) = 0 Then $IPPort = 25 Should it be: If IsNumber($IPPort) = 0 Then $IPPort = 25 Well, ok, I think I understand. If someone supplies a string then it gets converted to an int? Ok, I experimented with this: $Result = Number(42) MsgBox(0, "Number", $Result) MsgBox(0, "VarType", VarGetType($Result)) $Result = Number("42") MsgBox(0, "Number", $Result) MsgBox(0, "VarType", VarGetType($Result)) $Result = Number("a") MsgBox(0, "Number", $Result) MsgBox(0, "VarType", VarGetType($Result)) Which seems to support my conclusion. Edited September 23, 2010 by jaberwocky6669 Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Link to comment Share on other sites More sharing options...
Developers Jos Posted September 23, 2010 Author Developers Share Posted September 23, 2010 Is this a bug? If Number($IPPort) = 0 Then $IPPort = 25 Should it be: If IsNumber($IPPort) = 0 Then $IPPort = 25 Not sure what the issue is you are having and are trying to solve? The current If makes sure that the supplied $IPPort is a valid number not equals to zero to ensure a proper port number is supplied to the CDO. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
jaberwacky Posted September 24, 2010 Share Posted September 24, 2010 Yeah no, I answered my own question but thanks for taking the time to respond though. Appreciate that. Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Link to comment Share on other sites More sharing options...
t0nZ Posted September 28, 2010 Share Posted September 28, 2010 I want to thanks Jos because his smtp mail script solved a great problem for me.I was using another script for smtp mailing, but that script ceased to function with version of Windows above XP.So I start to use the "native" function of autoit _INetSmtpMail , that is ok for normal mail.But I have to send SMS (short messages) with an appliance by Quescom, (an ip device with some SIMs capable of making calls and send SMSs).This device accept to send SMS if it receive an email using : server : the ip of the devicefrom address : indifferentto address: gateway@quescom.itsubject : indifferentbody of the mail: SMS=333888999 TEXT=my short message.You can of course configure Outlook and thunderbird and start to send SMSBut _INetSmtpMail wan't work.The mail is sent, smtp trace all OK, but the sms is not sent, I know the Quescom and for me the body is not correctI suspect that _INetSmtpMail add some tipe of character(s) in the body of the mail, but I don't know how to resolve this.By now I use your script Jos.Greetz Link to comment Share on other sites More sharing options...
Zedna Posted December 20, 2010 Share Posted December 20, 2010 There can be easily added support for Priority propertyit's similar to Importance property which is already implemented.$objEmail.Fields.Item ("urn:schemas:mailheader:priority") = 1values are:[1,0,-1] = [cdoPriorityUrgent, cdoPriorityNormal, cdoPriorityNonUrgent] Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
tcb Posted January 5, 2011 Share Posted January 5, 2011 (edited) I am removing the content of my original post as I have resolved the while/wend issues I was having. However, I do now have a question about how the $body variable can have multiple values. I am trying to build a multiple line email with variables pulled from a csv file. This all works fine using a different inetsmtp function and $as_body[#] where # = number of lines required in email body and then declaring each line as $as_body[1] = and so on. Doesnt seem to work with this method causes a com error any ideas? many thanks Tony Edited January 5, 2011 by tcb Link to comment Share on other sites More sharing options...
Developers Jos Posted January 5, 2011 Author Developers Share Posted January 5, 2011 (edited) However, I do now have a question about how the $body variable can have multiple values. I am trying to build a multiple line email with variables pulled from a csv file. This all works fine using a different inetsmtp function and $as_body[#] where # = number of lines required in email body and then declaring each line as $as_body[1] = and so on. Use your own $body_array and at sent time simply do: $body = _ArrayToString($body_array, @crlf) Jos Edited January 5, 2011 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
tcb Posted January 6, 2011 Share Posted January 6, 2011 Jos, you are gent!! thanks Link to comment Share on other sites More sharing options...
tcb Posted January 6, 2011 Share Posted January 6, 2011 Jos, you are gent!! thanksbeing increasingly cheeky, is it possible to have images embedded with the email as well? I know I can add body array lines that refer to a web address for the png file, but i would prefer to send it with the email itself.ThanksTony Link to comment Share on other sites More sharing options...
Developers Jos Posted January 6, 2011 Author Developers Share Posted January 6, 2011 being increasingly cheeky, is it possible to have images embedded with the email as well? I know I can add body array lines that refer to a web address for the png file, but i would prefer to send it with the email itself.ThanksTonyReferencing an external image would be easy in an HTML body, but incorporating one will require to adapt the UDF.Maybe this article can help you with that: http://support.jodohost.com/showthread.php?t=7692 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
DavidRogers Posted January 14, 2011 Share Posted January 14, 2011 Great script, many thanks. David Link to comment Share on other sites More sharing options...
Medic873 Posted February 15, 2011 Share Posted February 15, 2011 This might be a stupid question but it is somthing that has been puzzling me. How do I make have more then one two address is it a , that divides them or what everything else tells you in the comment to the right except the to variable. Please help and thank you in advance. Link to comment Share on other sites More sharing options...
Developers Jos Posted February 15, 2011 Author Developers Share Posted February 15, 2011 $ToAddress = "To-adress1@test.com;To-adress2@test.com" Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Zulqarnain Posted February 16, 2011 Share Posted February 16, 2011 Thank you so much! This is the best! Link to comment Share on other sites More sharing options...
Vinh Posted February 22, 2011 Share Posted February 22, 2011 Hi, I don't know "SmtpServer" and it REQUIRED $SmtpServer = "MailServer" ; address for the smtp-server to use - REQUIRED Please help me Link to comment Share on other sites More sharing options...
guinness Posted February 22, 2011 Share Posted February 22, 2011 As your ISP or Mail Service Provider. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
SkellySoul Posted March 14, 2011 Share Posted March 14, 2011 (edited) Can someone do a example for hotmail (stmp.live.com) because I have tried many times over messing with the settings and cannot get it to work at all I get a error 2. I am using port 25 and I have tried using ssl set to 0 and 1 and tried username & password and changed everything but it refuses to work. I am using code in first post reason for not posting source is no need since I dont know what settings to post in my example since I tried so many Edited March 14, 2011 by SkellySoul Link to comment Share on other sites More sharing options...
Developers Jos Posted March 16, 2011 Author Developers Share Posted March 16, 2011 Found this info somewhere on the internet so that should be pretty straightforward assuming it works... so have you tried this? To setup mail client to access Windows Live Hotmail account, use the following Hotmail POP3 and SMTP configuration settings: Incoming Server (POP3 Server): pop3.live.com Incoming Server POP Port: 995 Incoming Server POP SSL Encryption: Yes (On or Required) Outgoing Server (SMTP Server): smtp.live.com Outgoing Server SMTP Port: 25 Outgoing Server Authentication: Yes (On – Use POP username and password or Hotmail credentials) Outgoing Server TLS or SSL Secure Encrypted Connection: Yes (On or Required) Tip (by J): Outgoing Server of Hotmail also supports port 587, useful for people who encounters error for STMP due to ISP blockage or any other reason. So my guess would be but can't test: $SmtpServer = "smtp.live.com" ; address for the smtp-server to use - REQUIRED $Username = "hotmail account" ; username for the account used from where the mail gets sent - REQUIRED $Password = "hotmail password" ; password for the account used from where the mail gets sent - REQUIRED $IPPort = 25 ; or 587 ; port used for sending the mail $ssl = 1 ; enables/disables secure socket layer sending - put to 1 if using httpS SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
greymouse Posted March 17, 2011 Share Posted March 17, 2011 The security for this can't be good. I mean if i want it to send an email to me with attachmen. With a new created email with usr and pw in the code. 1. Anyone can sniff the traffic, and maybe take my usr and pw. And do what they want. 2. Anyone can decompile my program which is easy to do, and take my usr and pw. So how can i secure this? I know that it's possible to send emails with php without using any passwords or usernames. Just using a email address and then send it. Link to comment Share on other sites More sharing options...
Developers Jos Posted March 17, 2011 Author Developers Share Posted March 17, 2011 (edited) The security for this can't be good.I mean if i want it to send an email to me with attachmen. With a new created email with usr and pw in the code.1. Anyone can sniff the traffic, and maybe take my usr and pw. And do what they want.2. Anyone can decompile my program which is easy to do, and take my usr and pw.So how can i secure this?I know that it's possible to send emails with php without using any passwords or usernames.Just using a email address and then send it.Decompile I agree but sniffer ->nope.You know what $SSL=1 will do? Edited March 17, 2011 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
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