Jump to content

_INetSmtpMail


 Share

Recommended Posts

Hello,

Just a simple and stupid question. Tried using this function but got nowhere.

It only works if i have a mail program in my computer???

In case i don't have an email program do i have to do an internet automatation or is there something else?

Thanks

I feel nothing.It feels great.

Link to comment
Share on other sites

From HelpFile :

_INetSmtpMail

Sends an email without using an external email program.

You have just to set all the parameters correctly and it will work ;)

Example :

#include <Inet.au3>
Local $s_SmtpServer = "mysmtpserver.com.au"
Local $s_FromName = "My Name"
Local $s_FromAddress = "From eMail Address"
Local $s_ToAddress = "To eMail Address"
Local $s_Subject = "My Test UDF"
Local $as_Body[2]
$as_Body[0] = "Testing the new email udf"
$as_Body[1] = "Second Line"
Local $Response = _INetSmtpMail($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body)
Local $err = @error
If $Response = 1 Then
MsgBox(0, "Success!", "Mail sent")
Else
MsgBox(0, "Error!", "Mail failed with error code " & $err)
EndIf

Hi!

Edited by Nessie

My UDF: NetInfo UDF Play with your network, check your download/upload speed and much more! YTAPI Easy to use YouTube API, now you can easy retrive all needed info from a video. NavInfo Check if a specific browser is installed and retrive other usefull information. YWeather Easy to use Yahoo Weather API, now you can easily retrive details about the weather in a specific region. No-IP UDF Easily update your no-ip hostname(s).

My Script: Wallpaper Changer Change you wallpaper dinamically, you can also download your wallpaper from your website and share it with all!   My Snippet: _ImageSaveToBMPConvert an image to bmp format. _SciteGOTO Open a file in SciTE at specific fileline. _FileToHex Show the hex code of a specified file

Link to comment
Share on other sites

Tried using this function but got nowhere.

What did you try? With 500+ posts I would have expected you to show what you at least tried.

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 parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

I just tried the example from the help files... hard to guess?

Local $s_SmtpServer = "smtp.live.com"
Local $s_FromName = "ilea"
Local $s_FromAddress = "test@hotmail.com"
Local $s_ToAddress = "test2@hotmail.com"
Local $s_Subject = "test"
Local $as_Body[2]
$as_Body[0] = "Testing the new email udf"
$as_Body[1] = "Second Line"
Local $Response = _INetSmtpMail($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body)
Local $err = @error
If $Response = 1 Then
MsgBox(0, "Success!", "Mail sent")
Else
MsgBox(0, "Error!", "Mail failed with error code " & $err)
EndIf

My return is "Unable to create socket"

Edited by ileandros

I feel nothing.It feels great.

Link to comment
Share on other sites

Look at Jos' _INetSmtpMailCom with the ability to send a file attachments. See how providing more details provided an answer. How? Because with Hotmail you need to set the port to 587 (or something like that) which you can't do with _INetSmtpMail.

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 parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Look at Jos' _INetSmtpMailCom with the ability to send a file attachments. See how providing more details provided an answer. How? Because with Hotmail you need to set the port to 587 (or something like that) which you can't do with _INetSmtpMail.

I already know that thats why i am trying to create an alternative function.

Port for hotmail as i found on internet is 25 with SSL

This is what i came up until now

$SmtpServer = "smtp.live.com"
$FromName = ""   ;Your email
$FromAddress = "" ;email
$ToAddress = "" ; TO email
$Subject = "Userinfo" ; subject
$Body = "try" ; text
$ssl = 1 ; SSL
$Port = 25
$Username = "" ; Email
$Password = "" ; Password
EmailSend($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $Username, $Password, $Port, $ssl)
Func EmailSend($sSmtpServer, $sFromName, $sFromAddress, $sToAddress, $sSubject = "", $sBody = "", $sUsername = "", $sPassword = "", $sPort = 25, $Sssl = 0)
$Message = ObjCreate("CDO.Message")
$config = ObjCreate("CDO.Configuration")
$field = $config.Fields
With $field
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $SmtpServer
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = $Port
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = $Username
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = $Password
.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = $ssl
.Update()
EndWith
With $Message
.Configuration = $config
.Subject = $Subject
.From = $FromName
.To = $ToAddress
.TextBody = $Body
.Send()
EndWith
EndFunc
Edited by ileandros

I feel nothing.It feels great.

Link to comment
Share on other sites

Tested and working :

#include <file.au3>

$SmtpServer = "smtp.live.com"
$FromName = "Test"
$FromAddress = "" ;Your email
$ToAddress = "" ; TO email
$Subject = "Userinfo" ; subject
$Body = "try" ; text
$AttachFiles = ""
$CcAddress = ""
$BccAddress = ""
$ssl = 1 ; SSL
$IPPort = 25
$Importance = "Normal"
$Username = "" ; Email
$Password = "" ; Password
Global $oMyRet[2]
Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc")

$rc = _INetSmtpMailCom($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $AttachFiles, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl)


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
If $s_AttachFiles <> "" Then
Local $S_Files2Attach = StringSplit($s_AttachFiles, ";")
For $x = 1 To $S_Files2Attach[0]
$S_Files2Attach[$x] = _PathFull($S_Files2Attach[$x])
;~ ConsoleWrite('@@ Debug : $S_Files2Attach[$x] = ' & $S_Files2Attach[$x] & @LF & '>Error code: ' & @error & @LF) ;### Debug Console
If FileExists($S_Files2Attach[$x]) Then
ConsoleWrite('+> File attachment added: ' & $S_Files2Attach[$x] & @LF)
$objEmail.AddAttachment($S_Files2Attach[$x])
Else
ConsoleWrite('!> File not found to attach: ' & $S_Files2Attach[$x] & @LF)
SetError(1)
Return 0
EndIf
Next
EndIf
$objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
$objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $s_SmtpServer
If Number($IPPort) = 0 Then $IPPort = 25
$objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = $IPPort
;Authenticated SMTP
If $s_Username <> "" Then
$objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
$objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = $s_Username
$objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = $s_Password
EndIf
If $ssl Then
$objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
EndIf
;Update settings
$objEmail.Configuration.Fields.Update
; Set Email Importance
Switch $s_Importance
Case "High"
$objEmail.Fields.Item("urn:schemas:mailheader:Importance") = "High"
Case "Normal"
$objEmail.Fields.Item("urn:schemas:mailheader:Importance") = "Normal"
Case "Low"
$objEmail.Fields.Item("urn:schemas:mailheader:Importance") = "Low"
EndSwitch
$objEmail.Fields.Update
; Sent the Message
$objEmail.Send
If @error Then
SetError(2)
Return $oMyRet[1]
EndIf
$objEmail = ""
EndFunc ;==>_INetSmtpMailCom

; Com Error Handler
Func MyErrFunc()
$HexNumber = Hex($oMyError.number, 8)
$oMyRet[0] = $HexNumber
$oMyRet[1] = StringStripWS($oMyError.description, 3)
ConsoleWrite("### COM Error ! Number: " & $HexNumber & " ScriptLine: " & $oMyError.scriptline & " Description:" & $oMyRet[1] & @LF)
SetError(1); something to check for when this function returns
Return
EndFunc ;==>MyErrFunc

Hi!

Edited by Nessie

My UDF: NetInfo UDF Play with your network, check your download/upload speed and much more! YTAPI Easy to use YouTube API, now you can easy retrive all needed info from a video. NavInfo Check if a specific browser is installed and retrive other usefull information. YWeather Easy to use Yahoo Weather API, now you can easily retrive details about the weather in a specific region. No-IP UDF Easily update your no-ip hostname(s).

My Script: Wallpaper Changer Change you wallpaper dinamically, you can also download your wallpaper from your website and share it with all!   My Snippet: _ImageSaveToBMPConvert an image to bmp format. _SciteGOTO Open a file in SciTE at specific fileline. _FileToHex Show the hex code of a specified file

Link to comment
Share on other sites

Can you this for me and tell me the resaults please?

$SmtpServer = "smtp.live.com"
$FromName = ""
$FromAddress = "" ;Your email
$ToAddress = "" ; TO email
$Subject = "Userinfo" ; subject
$Body = "try" ; text
$ssl = 1 ; SSL
$Port = 25
$Username = "" ; Email
$Password = "" ; Password
EmailSend($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $Username, $Password, $Port, $ssl)
Func EmailSend($sSmtpServer, $sFromName, $sFromAddress, $sToAddress, $sSubject = "", $sBody = "", $sUsername = "", $sPassword = "", $sPort = 25, $Sssl = 0)
$Message = ObjCreate("CDO.Message")
$config = ObjCreate("CDO.Configuration")
$field = $config.Fields
With $field
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $SmtpServer
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = $Port
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = $Username
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = $Password
.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = $ssl
.Update()
EndWith
With $Message
.Configuration = $config
.Subject = $Subject
.From = $FromName
.To = $ToAddress
.TextBody = $Body
.Send()
EndWith
EndFunc

Edit: I used Jos' function to check the return and this is what i got in my console

"### COM Error ! Number: 80020009 ScriptLine: 42 Description:The transport failed to connect to the server."

Edited by ileandros

I feel nothing.It feels great.

Link to comment
Share on other sites

Your code seems to work too ;) Just for curiosity, my previous code works in your case?

Hi!

Edited by Nessie

My UDF: NetInfo UDF Play with your network, check your download/upload speed and much more! YTAPI Easy to use YouTube API, now you can easy retrive all needed info from a video. NavInfo Check if a specific browser is installed and retrive other usefull information. YWeather Easy to use Yahoo Weather API, now you can easily retrive details about the weather in a specific region. No-IP UDF Easily update your no-ip hostname(s).

My Script: Wallpaper Changer Change you wallpaper dinamically, you can also download your wallpaper from your website and share it with all!   My Snippet: _ImageSaveToBMPConvert an image to bmp format. _SciteGOTO Open a file in SciTE at specific fileline. _FileToHex Show the hex code of a specified file

Link to comment
Share on other sites

Check your firewall if you have one. Do you have a @hotmail.com address?

Hi!

My UDF: NetInfo UDF Play with your network, check your download/upload speed and much more! YTAPI Easy to use YouTube API, now you can easy retrive all needed info from a video. NavInfo Check if a specific browser is installed and retrive other usefull information. YWeather Easy to use Yahoo Weather API, now you can easily retrive details about the weather in a specific region. No-IP UDF Easily update your no-ip hostname(s).

My Script: Wallpaper Changer Change you wallpaper dinamically, you can also download your wallpaper from your website and share it with all!   My Snippet: _ImageSaveToBMPConvert an image to bmp format. _SciteGOTO Open a file in SciTE at specific fileline. _FileToHex Show the hex code of a specified file

Link to comment
Share on other sites

Have you tried port 587 with ssl enabled?

Hi

My UDF: NetInfo UDF Play with your network, check your download/upload speed and much more! YTAPI Easy to use YouTube API, now you can easy retrive all needed info from a video. NavInfo Check if a specific browser is installed and retrive other usefull information. YWeather Easy to use Yahoo Weather API, now you can easily retrive details about the weather in a specific region. No-IP UDF Easily update your no-ip hostname(s).

My Script: Wallpaper Changer Change you wallpaper dinamically, you can also download your wallpaper from your website and share it with all!   My Snippet: _ImageSaveToBMPConvert an image to bmp format. _SciteGOTO Open a file in SciTE at specific fileline. _FileToHex Show the hex code of a specified file

Link to comment
Share on other sites

So just for curiosity, are you able to send email with an email client like Mozilla Thunderbird? If yes try to grab the correct email config from here.

Hi!

My UDF: NetInfo UDF Play with your network, check your download/upload speed and much more! YTAPI Easy to use YouTube API, now you can easy retrive all needed info from a video. NavInfo Check if a specific browser is installed and retrive other usefull information. YWeather Easy to use Yahoo Weather API, now you can easily retrive details about the weather in a specific region. No-IP UDF Easily update your no-ip hostname(s).

My Script: Wallpaper Changer Change you wallpaper dinamically, you can also download your wallpaper from your website and share it with all!   My Snippet: _ImageSaveToBMPConvert an image to bmp format. _SciteGOTO Open a file in SciTE at specific fileline. _FileToHex Show the hex code of a specified file

Link to comment
Share on other sites

Try with this:

$sUser = "";YourEmail
$sPass = "" ;YourPassword
$sServer = "smtp.live.com"
$sFrom = "";YourEmail
$sTo = "" ;ToEmail
$sPort = 25
$sObject = "Test"
$sMessage = "MyMessage"

_SendMail(_Base64Encode($sUser), _Base64Encode($sPass), $sServer, $sFrom, $sTo, $sPort, $sObject, $sMessage)

Func _SendMail($user, $pass, $server, $from, $to, $port = 25, $obj = "object", $msg = "message", $visibile = False)
    $msg = StringReplace($msg, @CRLF & "." & @CRLF, @CRLF & "," & @CRLF)
    $limit_time = 15000
    If $visibile = True Then SplashTextOn("Send Email", "Starting Connection...", 200, 100)
    TCPStartup()
    $main_sock = TCPConnect(TCPNameToIP($server), $port)
    $timer = TimerInit()
    While TimerDiff($timer) < $limit_time
        $rec = TCPRecv($main_sock, 1000)
        If $rec <> "" Then ExitLoop
    WEnd
    $timer = 0
    If $rec = "" Then Return SetError(1, 0, 0)
    If $visibile = True Then SplashTextOn("Send Email", "Connection OK!" & @CRLF & "Dialog with server...", 200, 100)
    TCPSend($main_sock, "HELO EMAIL" & @CRLF)
    $timer = TimerInit()
    While TimerDiff($timer) < $limit_time
        $rec = TCPRecv($main_sock, 1000)
        If $rec <> "" Then ExitLoop
    WEnd
    $timer = 0
    If $rec = "" Then Return SetError(1, 0, 0)
    If $visibile = True Then SplashTextOn("Send Email", "Connection OK!" & @CRLF & "Login...", 200, 100)
    TCPSend($main_sock, "AUTH LOGIN" & @CRLF)
    $timer = TimerInit()
    While TimerDiff($timer) < $limit_time
        $rec = TCPRecv($main_sock, 1000)
        If $rec <> "" Then ExitLoop
    WEnd
    $timer = 0
    If $rec = "" Then Return SetError(1, 0, 0)
    TCPSend($main_sock, $user & @CRLF)
    $timer = TimerInit()
    While TimerDiff($timer) < $limit_time
        $rec = TCPRecv($main_sock, 1000)
        If $rec <> "" Then ExitLoop
    WEnd
    $timer = 0
    TCPSend($main_sock, $pass & @CRLF)
    $timer = TimerInit()
    While TimerDiff($timer) < $limit_time
        $rec = TCPRecv($main_sock, 1000)
        If $rec <> "" Then ExitLoop
    WEnd
    $timer = 0
    If $rec = "" Then Return SetError(1, 0, 0)
    If $visibile = True Then SplashTextOn("Send Email", "Connection OK!" & @CRLF & "Sending email...", 200, 100)
    TCPSend($main_sock, "MAIL FROM:<" & $from & ">" & @CRLF)
    $timer = TimerInit()
    While TimerDiff($timer) < $limit_time
        $rec = TCPRecv($main_sock, 1000)
        If $rec <> "" Then ExitLoop
    WEnd
    $timer = 0
    If $rec = "" Then Return SetError(1, 0, 0)
    TCPSend($main_sock, "RCPT TO:<" & $to & ">" & @CRLF)
    $timer = TimerInit()
    While TimerDiff($timer) < $limit_time
        $rec = TCPRecv($main_sock, 1000)
        If $rec <> "" Then ExitLoop
    WEnd
    $timer = 0
    TCPSend($main_sock, "DATA" & @CRLF)
    $timer = TimerInit()
    While TimerDiff($timer) < $limit_time
        $rec = TCPRecv($main_sock, 1000)
        If $rec <> "" Then ExitLoop
    WEnd
    $timer = 0
    If $rec = "" Then Return SetError(1, 0, 0)
    TCPSend($main_sock, "SUBJECT:" & $obj & @CRLF)
    TCPSend($main_sock, "" & @CRLF)
    TCPSend($main_sock, $msg & @CRLF & "." & @CRLF)
    $timer = TimerInit()
    While TimerDiff($timer) < $limit_time
        $rec = TCPRecv($main_sock, 1000)
        If $rec <> "" Then ExitLoop
    WEnd
    $timer = 0
    If $rec = "" Then Return SetError(1, 0, 0)
    If $visibile = True Then SplashOff()
    TCPCloseSocket($main_sock)
    TCPShutdown()
    Return $rec
EndFunc   ;==>_SendMail

Func _Base64Encode($Data, $LineBreak = 76)
    Local $Opcode = "0x5589E5FF7514535657E8410000004142434445464748494A4B4C4D4E4F505152535455565758595A6162636465666768696A6B6C6D6E6F707172737475767778797A303132333435363738392B2F005A8B5D088B7D108B4D0CE98F0000000FB633C1EE0201D68A06880731C083F901760C0FB6430125F0000000C1E8040FB63383E603C1E60409C601D68A0688470183F90176210FB6430225C0000000C1E8060FB6730183E60FC1E60209C601D68A06884702EB04C647023D83F90276100FB6730283E63F01D68A06884703EB04C647033D8D5B038D7F0483E903836DFC04750C8B45148945FC66B80D0A66AB85C90F8F69FFFFFFC607005F5E5BC9C21000"

    Local $CodeBuffer = DllStructCreate("byte[" & BinaryLen($Opcode) & "]")
    DllStructSetData($CodeBuffer, 1, $Opcode)

    $Data = Binary($Data)
    Local $Input = DllStructCreate("byte[" & BinaryLen($Data) & "]")
    DllStructSetData($Input, 1, $Data)

    $LineBreak = Floor($LineBreak / 4) * 4
    Local $OputputSize = Ceiling(BinaryLen($Data) * 4 / 3)
    $OputputSize = $OputputSize + Ceiling($OputputSize / $LineBreak) * 2 + 4

    Local $Ouput = DllStructCreate("char[" & $OputputSize & "]")
    DllCall("user32.dll", "none", "CallWindowProc", "ptr", DllStructGetPtr($CodeBuffer), _
            "ptr", DllStructGetPtr($Input), _
            "int", BinaryLen($Data), _
            "ptr", DllStructGetPtr($Ouput), _
            "uint", $LineBreak)
    Return DllStructGetData($Ouput, 1)
EndFunc   ;==>_Base64Encode

Hi!

My UDF: NetInfo UDF Play with your network, check your download/upload speed and much more! YTAPI Easy to use YouTube API, now you can easy retrive all needed info from a video. NavInfo Check if a specific browser is installed and retrive other usefull information. YWeather Easy to use Yahoo Weather API, now you can easily retrive details about the weather in a specific region. No-IP UDF Easily update your no-ip hostname(s).

My Script: Wallpaper Changer Change you wallpaper dinamically, you can also download your wallpaper from your website and share it with all!   My Snippet: _ImageSaveToBMPConvert an image to bmp format. _SciteGOTO Open a file in SciTE at specific fileline. _FileToHex Show the hex code of a specified file

Link to comment
Share on other sites

Nah doesn't seem to work... My network must be the problem...

Thanks anyway. I am looking microsoft site to see how to check if port 25 is blocked or not. telnet doesnt seem to work in my cmd commands and i dont know a lot of website who can check if port are blocked or not.

Thanks, cheers

I feel nothing.It feels great.

Link to comment
Share on other sites

In this case i think that something in your pc are blocking that port ;)

Hi!

My UDF: NetInfo UDF Play with your network, check your download/upload speed and much more! YTAPI Easy to use YouTube API, now you can easy retrive all needed info from a video. NavInfo Check if a specific browser is installed and retrive other usefull information. YWeather Easy to use Yahoo Weather API, now you can easily retrive details about the weather in a specific region. No-IP UDF Easily update your no-ip hostname(s).

My Script: Wallpaper Changer Change you wallpaper dinamically, you can also download your wallpaper from your website and share it with all!   My Snippet: _ImageSaveToBMPConvert an image to bmp format. _SciteGOTO Open a file in SciTE at specific fileline. _FileToHex Show the hex code of a specified file

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...