1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| Dim strCmd As String, strBlatExe As String
Dim strFile As String, strSujet As String
Dim strFrom As String, strTo As String
Dim strServer As String, strUserPwd As String
Dim bDebug As Boolean
bDebug = True
strBlatExe = """C:\tools\blat\blat.exe"""
strFile = " ""C:\Mes Documents\.....\Un fichier.txt"""
strTo = " -to destinataire@toto.fr"
strFrom = " -from expediteur@titi.com"
strSujet = " -subject ""Essai email smtp"""
strServer = " -server serveursmtp.titi.com -port 123"
strCmd = strCmd & strBlatExe & strFile & strTo & strSujet & strFrom & strServer
If bDebug Then
strCmd = "CMD /K """ & strCmd & " -debug"""
End If
Shell strCmd, vbNormalFocus |