Bonsoir,
Je souhaiterais, à partir de mon script VBS d’envoi de mail, créer une application HTML (HTA) qui m'édite certaines données du script (identifiants par exemple) sous la forme d'un espace texte afin que je puisse rentrer moi même les informations. Ainsi qu'un bouton envoyer à l'envoie du mail. Voici mon script:
j'aimerais avoir:
Code HTML : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62 <HTML> <HEAD> <TITLE>Post-it HTA</TITLE> <HTA:APPLICATION ID="postit" APPLICATIONNAME="hta-post-it" SINGLEINSTANCE="Yes" VERSION="1.0" ICON="notepad.exe" MAXIMIZEBUTTON="No" SHOWINTASKBAR="No" SCROLL="No"> > </HEAD> <SCRIPT TYPE="text/Vbscript"> Const cdoSendUsingPickup = 1 Const cdoSendUsingPort = 2 Const cdoAnonymous = 0 Const cdoBasic = 1 Const cdoNTLM = 2 Set objMessages = CreateObject("CDO.Message") objMessages.Subject = monsujet objMessages.From = "monadresse@yahoo.com" objMessages.To = "sonadresse@yahoo.com" sBody = test objMessages.HTMLBody = sBody objMessages.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objMessages.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.mail.yahoo.com" objMessages.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic objMessages.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusername") = "monadresse@yahoo.com" objMessages.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "monmdp" objMessages.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465 objMessages.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True objMessages.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 2000 objMessages.Configuration.Fields.Update objMessages.Send If Err.Number <> 0 Then Else End If On Error GoTo 0 </SCRIPT> <body> </Body> </HTML>
Ligne 24, un champs champs texte pour remplir objMessages.From =
Ligne 25, un champs champs texte pour remplir objMessages.To =
Ligne 49/50, un menu déroulant pour choisir mon délai moi même parmi quelques autres pour remplir
objMessages.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") =Ligne 53, un bouton pour déclencher l'envoi.
J'aimerais me lancer dans le HTA mais je nage un peu.. après certains exemple je pourrai me débrouiller seule..
Je vous remercie pour votre aide,
Marion.
Partager