Hey,
Ich weiss das dieses Thema schon öfers angesprochen wurde und ich hab mir schon viele treats dazu durchgelesen aber ich weiss immernoch nicht wie man eine Email senden kann ohne email programm also sowas extra zum email senden sondern das autoit das sendet.
Bitte helfen
Email senden
-
- [ gelöst ]
-
BadBunny -
17. Juni 2010 um 15:37 -
Geschlossen -
Erledigt
-
-
-
Was meinen die mit server?
wie find ich den heraus?
Ist der bei jeder email adresse anders oder bei jedem pc??? sry ich kenn mich damit nicht aus -
Erst mal schön das du Fan von bist (guck Signatur )
Also sind genau die Sachen die man auch bei jedem anderen Prog. eingeben muss, womit man seine E-Mails liest.
Guck dir doch mal den Thread an: [ gelöst ] Daten an email senden*hust*
Benutze doch einfach mal Google:
Erster Treffer. Einfach dem Link folgen... -
alos ich habs mal damit prob. aber es geht trotzdem nicht :
Spoiler anzeigen
[autoit]
[/autoit] [autoit][/autoit] [autoit]
$s_SmtpServer = "smtp.web.de"
$s_FromName = "lalala " ;das ist doch egal oder?
$s_FromAddress = "???" ; muss ich hier die abasender adresse reinschreiben?
$s_ToAddress = "_______@web.de" ; die adresse die die mail gesendet bekommt (?)
$s_Subject = "Meine Test UDF"
$as_Body = "Die neue E-Mail UDF wird getestet"$Response = _INetSmtpMail($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body)
[/autoit]
$err = @error
If $Response = 1 Then
MsgBox(0, "Erfolg!", "Die E-Mail wurde versandt")
Else
MsgBox(0, "Fehler!", "Das versenden der E-Mail schlug fehl. Fehlercode: " & $err)
EndIfdas funkt. irg wie nicht ... *grübel*
-
- Offizieller Beitrag
Spoiler anzeigen
[autoit][/autoit] [autoit][/autoit] [autoit]#include <INet.au3>
[/autoit] [autoit][/autoit] [autoit]
$s_SmtpServer = "mail.gmx.net"
$s_FromName = "Chef"
$s_FromAddress = "xxx@gmx.de"
$s_ToAddress = "xxx@gmx.de"
$s_Subject = "My Test UDF"
$s_UName = "xxx@gmx.de"
$s_PWD = "xxx"
#cs
$arIniRead = IniReadSection(@ScriptDir & '\mails.ini', "mail")
$s_SmtpServer = $arIniRead[1][1]
$s_FromName = $arIniRead[2][1]
$s_FromAddress = $arIniRead[3][1]
$s_ToAddress = $arIniRead[4][1]
$s_Subject = $arIniRead[5][1]
$s_UName = $arIniRead[6][1]
$s_PWD = $arIniRead[7][1]
MsgBox(0, "", $s_SmtpServer & ' ' & $s_FromName & ' ' & $s_FromAddress & ' ' & $s_ToAddress & ' ' & $s_Subject & ' ' & $s_UName & ' ' & $s_PWD)
#ceDim $as_Body[2]
[/autoit] [autoit][/autoit] [autoit]
$as_Body[0] = "Testing the new email udf"
$as_Body[1] = "Second Line"
$Response = _INetSmtpMailAuth($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_UName, $s_PWD, $s_Subject, $as_Body)
;~ $Response = _INetSmtpMail($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body, "", "", 1)
$err = @error
If $Response = 1 Then
MsgBox(0, "Success!", "Mail sent")
Else
MsgBox(0, "Error!", "Mail failed with error code " & $err)
EndIf;===============================================================================
[/autoit] [autoit][/autoit] [autoit]
;
; Function Name: _INetSmtpMailAuth()
; Description: Sends an email using SMTP over TCP IP.
; Parameter(s): $s_SmtpServer - SMTP server to be used for sending email
; $s_FromName - Name of sender
; $s_FromAddress - eMail address of sender
; $s_ToAddress - Address that email is to be sent to
; $s_Username - Username for Authentication (bernd670)
; $s_Passwd - Password for Authentication (bernd670)
; $s_Subject - Subject of eMail
; $as_Body - Single dimension array containing the body of eMail as strings
; $s_helo - Helo identifier (default @COMPUTERNAME) sometime needed by smtp server
; $s_first - send before Helo identifier (default @CRLF) sometime needed by smtp server
; $b_trace - trace on a splash window (default 0 = no trace)
; Requirement(s): None
; Return Value(s): On Success - Returns 1
; On Failure - 0 and sets
; @ERROR = 1 - Invalid Parameters
; @ERROR = 2 - Unable to start TCP
; @ERROR = 3 - Unable to resolve IP
; @ERROR = 4 - Unable to create socket
; @ERROR = 5x - Cannot open SMTP session
; @ERROR = 50x - Cannot send body
; @ERROR = 5000 - Cannot close SMTP session
; Authors: Original function to send email via TCP - Asimzameer
; Conversion to UDF - Walkabout
; Correction Helo, timeout, trace - Jpm
; Correction send before Helo - Jpm
; Include Authentication - bernd670
;
;===============================================================================
Func _INetSmtpMailAuth($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Username, $s_Passwd, $s_Subject = "", $as_Body = "", $s_helo = "", $s_first = "-1", $b_trace = 0)Local $v_Socket
[/autoit] [autoit][/autoit] [autoit]
Local $s_IPAddress
Local $i_Count
Local $s_Send[9]
Local $s_ReplyCode[9];Return code from SMTP server indicating successIf $s_SmtpServer = "" Or $s_FromAddress = "" Or $s_ToAddress = "" Or $s_Username = "" Or $s_Passwd = "" Or $s_FromName = "" Or StringLen($s_FromName) > 256 Then
[/autoit] [autoit][/autoit] [autoit]
SetError(1)
Return 0
EndIf
If $s_helo = "" Then $s_helo = @ComputerName
If TCPStartup() = 0 Then
SetError(2)
Return 0
EndIf
StringRegExp($s_SmtpServer, "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)")
If @extended Then
$s_IPAddress = $s_SmtpServer
Else
$s_IPAddress = TCPNameToIP($s_SmtpServer)
EndIf
If $s_IPAddress = "" Then
TCPShutdown()
SetError(3)
Return 0
EndIf
$v_Socket = TCPConnect($s_IPAddress, 25)
If $v_Socket = -1 Then
TCPShutdown()
SetError(4)
Return (0)
EndIf$s_Send[0] = "EHLO " & $s_helo & @CRLF
[/autoit] [autoit][/autoit] [autoit]
;~ If StringLeft($s_helo,5) <> "EHLO " Then $s_Send[0] = "EHLO " & $s_helo & @CRLF
$s_ReplyCode[0] = "250"$s_Send[1] = "AUTH LOGIN" & @CRLF
[/autoit] [autoit][/autoit] [autoit]
$s_ReplyCode[1] = "334"
$s_Send[2] = _Base64Encoding($s_Username) & @CRLF
$s_ReplyCode[2] = "334"
$s_Send[3] = _Base64Encoding($s_Passwd) & @CRLF
$s_ReplyCode[3] = "235"
$s_Send[4] = "MAIL FROM: <" & $s_FromAddress & ">" & @CRLF
$s_ReplyCode[4] = "250"
$s_Send[5] = "RCPT TO: <" & $s_ToAddress & ">" & @CRLF
$s_ReplyCode[5] = "250"
$s_Send[6] = "DATA" & @CRLF
$s_ReplyCode[6] = "354"$s_Send[7] = "From: " & $s_FromName & " <" & $s_FromAddress & ">" & @CRLF & _
[/autoit] [autoit][/autoit] [autoit]
"To: " & "<" & $s_ToAddress & ">" & @CRLF & _
"Subject: " & $s_Subject & @CRLF & _
"Mime-Version: 1.0" & @CRLF & _
"Content-Type: text/plain; charset=US-ASCII" & @CRLF & _
@CRLF
$s_ReplyCode[7] = ""$s_Send[8] = @CRLF & "." & @CRLF
[/autoit] [autoit][/autoit] [autoit]
$s_ReplyCode[8] = "250"; open stmp session
[/autoit] [autoit][/autoit] [autoit]
If __SmtpSend($v_Socket, $s_Send[0], $s_ReplyCode[0], $b_trace, "220", $s_first) Then
SetError(50)
Return 0
EndIf; send header
[/autoit] [autoit][/autoit] [autoit]
For $i_Count = 0 To UBound($s_Send) - 2
If __SmtpSend($v_Socket, $s_Send[$i_Count], $s_ReplyCode[$i_Count], $b_trace) Then
SetError(50 + $i_Count)
Return 0
EndIf
Next; send body records (a record can be multiline : take care of a subline beginning with a dot should be ..)
[/autoit] [autoit][/autoit] [autoit]
For $i_Count = 0 To UBound($as_Body) - 1
; correct line beginning with a dot
If StringLeft($as_Body[$i_Count], 1) = "." Then $as_Body[$i_Count] = "." & $as_Body[$i_Count]If __SmtpSend($v_Socket, $as_Body[$i_Count] & @CRLF, "", $b_trace) Then
[/autoit] [autoit][/autoit] [autoit]
SetError(500 + $i_Count)
Return 0
EndIf
Next; close the smtp session
[/autoit] [autoit][/autoit] [autoit]
$i_Count = UBound($s_Send) - 1
If __SmtpSend($v_Socket, $s_Send[$i_Count], $s_ReplyCode[$i_Count], $b_trace) Then
SetError(5000)
Return 0
EndIfTCPCloseSocket($v_Socket)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]
TCPShutdown()
Return 1
EndFunc ;==>_INetSmtpMailAuth;===============================================================================
[/autoit] [autoit][/autoit] [autoit]
;
; Function Name: _Base64Encoding()
; Description: Kodiert eine Zeichenfolge mit dem Base64-Verfahren
; (http://de.wikipedia.org/wiki/Base64)
; Parameter(s): $String - Zeichenfolge die kodiert werden soll
; Requirement(s): None
; Return Value(s): Kodierte Zeichenfolge
; Authors: bernd670
;
;===============================================================================
Func _Base64Encoding($String)$strUmsetzung = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
[/autoit] [autoit][/autoit] [autoit]
$strRetValue = ""For $i = 1 To StringLen($String) Step 3
[/autoit] [autoit][/autoit] [autoit]
$strTok = StringMid($String, $i, 3)
Switch StringLen($strTok)
Case 3
$iTokVal = (Asc(StringMid($strTok, 1, 1)) * 256 + _
Asc(StringMid($strTok, 2, 1))) * 256 + _
Asc(StringMid($strTok, 3, 1))
$strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1)
$iTokVal = BitShift($iTokVal, 6)
$strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1) & $strTokCryt
$iTokVal = BitShift($iTokVal, 6)
$strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1) & $strTokCryt
$iTokVal = BitShift($iTokVal, 6)
$strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1) & $strTokCryt
$strRetValue &= $strTokCrytCase 2
[/autoit] [autoit][/autoit] [autoit]
$iTokVal = (Asc(StringMid($strTok, 1, 1)) * 256 + _
Asc(StringMid($strTok, 2, 1))) * 256
$iTokVal = BitShift($iTokVal, 6)
$strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1)
$iTokVal = BitShift($iTokVal, 6)
$strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1) & $strTokCryt
$iTokVal = BitShift($iTokVal, 6)
$strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1) & $strTokCryt
$strRetValue &= $strTokCryt & "="Case 1
[/autoit] [autoit][/autoit] [autoit]
$iTokVal = Asc(StringMid($strTok, 1, 1)) * 65536
$iTokVal = BitShift($iTokVal, 12)
$strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1)
$iTokVal = BitShift($iTokVal, 6)
$strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1) & $strTokCryt
$strRetValue &= $strTokCryt & "=="EndSwitch
[/autoit] [autoit][/autoit] [autoit]
NextReturn $strRetValue
[/autoit]
EndFunc ;==>_Base64Encoding -
:o was bewirkt der script???
sendet an ne gmx adresse... von Chef... was hatte ich den falsch( hab auch das #include inet dazu )
geht immernoch nicht... -
- Offizieller Beitrag
Das Skript funktioniert!
Du musst nur die richtigen Parameter übergeben! -
ich glaub dir das der script funkt. aber wie find ich die parameter raus!!?? habe in web adresse gemacht absender und emfänger den server geändert etc funkt. trotzdem nicht und das ist seeeehr umständlich (zumindest von der länge her) im vergleich zu dem was für bsp die anderen machten und wesentlich komplizierter.
-
- Offizieller Beitrag
Mehr kann ich nicht tun.
Du musst nur hier das richtige eintragenSpoiler anzeigen
$s_SmtpServer = "mail.gmx.net"
$s_FromName = "Chef"
$s_FromAddress = "xxx@gmx.de"
$s_ToAddress = "xxx@gmx.de"
$s_Subject = "My Test UDF"
$s_UName = "xxx@gmx.de"
$s_PWD = "xxx"
Mega -
Hallo BadBunny,
auch das Skript, dessen Link: [ gelöst ] Daten an email senden AntiSpeed bereits gepostet hat funktioniert. Du musst für Web.de allerdings den Port anpassen, siehe Post #14 im gleichen Thread. im Post #14 sind ausserdem noch andere Daten für andere Freemailer
mfg (Auto)Bert
-
danke autobert , ich hatte mir diesen treat bereits öfters angeschaut und habe für web.de auch schon geändert gehabt. da ich leider keinen email service habe muss ich es mit dem befehl die email ohne service zu verschicken machen.
[autoit]
Inet smtp mail
[/autoit][autoit][/autoit][autoit]
#include <INet.au3>_INetSmtpMail ( $s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress
[/autoit]
[,$s_Subject [,$as_Body [,$s_helo [,$s_first [,$b_trace]]]]])
bei dem smptserver muss ich dann smtp.web.de
bei from name nen beliebigen namen (ggf. @ComputerName)
from adress eine email von der der inhalt gesendet werden soll (**@web.de)
to adress die adresse an die es geht (**@web.de)
subject = betreff
body = (?????)
helo = (?????)
first = (?????)
trace = (?????)
habe bereit in der hilfe datei nachgelsenen
bitte sagen wie ich das genau mache weil wenn ich es so mache geht es nicht ... (also die (?????) sind sachen , wo ich nicht weis was dahin kommt ...) -
das hier sollte klappen.
-
Das ist ja jetzt auch wieder was anderes.. könnt ihr pls ein bsp. mit _InetSmtpNet machen??? du hast da noch so ein Com dahinter...
kann man nicht einfach sagen das wird gesendet fertig??? ihr habt dahinter noch so lange sachen zum anzeigen wenns fehlschlägt etc. ich will nur wissen wie ich einen text an eine email sende ohne eine email hilfe zu haben deswegen auch _InetSmtpNet.
und da brauch man diese vielen anderen sachen nicht nur
$s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress
[,$s_Subject [,$as_Body [,$s_helo [,$s_first [,$b_trace]]]]]) -
da brauchste doch nur die oberen 9 Felder auszufüllen und ab geht die Mail, einfacher gehts doch nicht. oder?
-
Hallo BadBunny,
die Standardfunktion
[autoit]_INetSmtpMail
[/autoit]kann nicht funktionieren, da du dort keinen Port mitgeben kannst und Web.de nicht über den Standardport 25 funktioniert, deshalb
[autoit]_INetSmtpMailCom
[/autoit]teste doch einfach dieses SKript mir deinen Zugangsdaten:
Spoiler anzeigen
[autoit]Global $oMyRet[2]
[/autoit] [autoit][/autoit] [autoit]
Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc");#include <_pop3.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <_INetSmtpMailCom.au3>;##################################
[/autoit] [autoit][/autoit] [autoit]
; Variables
;##################################
$SmtpServer = "smtp.web.de" ; address for the smtp-server to use - REQUIRED
$FromName = "" ; name from who the email was sent
$FromAddress = "myName@web.de" ; address from where the mail should come
$ToAddress = "taAdress@gmx.de" ; destination address of the email - REQUIRED
$Subject = "Userinfo" ; subject from the email - can be anything you want it to be
$Body = "Test" ; the messagebody from the mail - can be left blank but then you get a blank mail
$AttachFiles = "" ; the file you want to attach- leave blank if not needed
$CcAddress = "" ; address for cc - leave blank if not needed
$BccAddress = "" ; address for bcc - leave blank if not needed
$Importance = "Normal" ; Send message priority: "High", "Normal", "Low"
$Username = "myName@web.de" ; username for the account used from where the mail gets sent - REQUIRED
$Password = "PassWort" ; password for the account used from where the mail gets sent - REQUIRED
$IPPort = 587 ; port used for sending the mail normaly 25
$ssl = 0 ; enables/disables secure socket layer sending - put to 1 if using httpS
;~ $IPPort=465 ; GMAIL port used for sending the mail
;~ $ssl=1 ; GMAILenables/disables secure socket layer sending - put to 1 if using httpS;##################################
[/autoit]
; Script
;##################################
;_pop3Connect("pop3.live.com", $Username, $Password)
$rc = _INetSmtpMailCom($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $AttachFiles, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl)
If @error Then
MsgBox(0, "Error sending message", "Error code:" & @error & " Description:" & $rc)
EndIffalls ein Fehler auftritt poste einfach die Ausgabemeldungen von Scite-Konsole.
Du kannst dir natürlich auch die Inet.Au3 anpassen, damit du den richtigen Port 587 übergeben kannst,
mfg (Auto)Bert
@xp_user, deine Lösung ist die gleiche wie in dem von mir emphohlenen Link und obigen Skript, also darf auch hier nicht vergessen werden den Port auf 587 für web.de zu setzen
-
der kann die includes nicht lesen ... ka why
-
Hallo BadBunny,
dann hast du den von mir bereits geposteten Link auch noch nie getestet, denn dort ist das benötigte Include-File gepostet), sagtest aber dass dieser nicht funktioniert.
Werde meinen vorherigen Post editieren und das Include dort angehängen, damit Skript und Include zusammen gefunden werden können,mfg (Auto)Bert
-
Ich hatte den von dir verwendet / ausporbiert und dann kommt da ne nachricht das Error opening the file
-
Ich hatte den von dir verwendet / ausporbiert und dann kommt da ne nachricht das Error opening the file
mit dieser ungenauen Fehlerbsechreibung kann man dir nicht helfen
falls ein Fehler auftritt poste einfach die Ausgabemeldungen von Scite-Konsole.
mfg (Auto)Bert
-