txt file zu schicken lassen

11/04/2009 16:33 VRF#1
Die frage steht noch!

hay leute,
ich suche nache einer möglichkeit mir eine txt datei von einem anderen pc auf meinen zu senden (als email oder so). Das ganze sollte dann in einen bereits von mir gemacht skript eingebaut werden. Er sollte die datei auch öfters schicken können nach einer bestimmten zeit.;)
11/04/2009 17:45 unknown661#2
hab die function am rechner rumliegen gehabt, habs nie mit attachments getestet... aber vllt fängst du ja was damit an

PHP Code:
Func _INetSmtpMailCom($s_SmtpServer$s_FromName$s_FromAddress$s_ToAddress$s_Subject ""$as_Body ""$s_AttachFiles ""$s_CcAddress ""$s_BccAddress ""$s_Username ""$s_Password "",$IPPort=25$ssl=0)
    
$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])
            If 
FileExists($S_Files2Attach[$x]) Then
                $objEmail
.AddAttachment ($S_Files2Attach[$x])
            Else
                
$i_Error_desciption $i_Error_desciption & @lf 'File not found to attach: ' $S_Files2Attach[$x]
                
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
    $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
Sent the Message
    $objEmail
.Send
    
if @error then
        SetError
(2)
        return 
$oMyRet[1]
    EndIf
EndFunc ;==>_INetSmtpMailCom 
11/04/2009 18:02 VRF#3
ok thx erstmal,
also wenn ich dass richtig verstanden habe schickt ne email aber wohin wird diese geschickt, wie kann ich aussuchen was geschickt wird??
11/04/2009 18:15 unknown661#4
siehe übergabeparameter

->
PHP Code:
$s_SmtpServer$s_FromName$s_FromAddress$s_ToAddress$s_Subject ""$as_Body ""$s_AttachFiles ""$s_CcAddress ""$s_BccAddress ""$s_Username ""$s_Password "",$IPPort=25$ssl=
11/04/2009 18:42 VRF#5
ahja ... sry ich check das irgentwie nich so richtin... könntest du ein beispiel dazu machen oder so?
11/04/2009 18:57 unknown661#6
PHP Code:
_INetSmtpMailCom("mail.gmx.net""max mustermann""[Only registered and activated users can see links. Click Here To Register...]""empfä[Only registered and activated users can see links. Click Here To Register...]""Betreff""textkörper""""""""emailLoginName""emailPasswort"251
statt mail.gmx.net musst du halt den jeweiligen smtp server angeben und den empfänger musst du auch ändern sowie emailLoginName und emailPasswort
11/04/2009 19:12 VRF#7
achso :D
Danke jetz hab ichs begriffen :)
aber es funktioniert nicht... gibts nich ne andre möglichkeit?? über icq skype oder so???
11/09/2009 13:47 VRF#8
Hat niemand ne idee??