Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with program of sending emails

Status
Not open for further replies.

DiExE

Technical User
May 22, 2007
4
UY
hello (i dont speak english a lot) i speak spanish but something i understend.
The forum is great.
I maked a program to send X numbers of emails but i can't do it stop (only killing the procces with Task manager)
i want to insert a msgbox that when you press accept the program close and stop of sending emails.
here is the code:


----------------------------------
msgbox "Este programa envia emails sin parar a una cuenta Correo:" & chr(10) & "@hotmail.com, @yahoo.com, @adinet.com.uy, @gmail.com .", 0 + 64, "Diego Suárez"
to = inputbox("Escribi el email al que queres floodear." & chr(10) & "Ej: diego@hotmail.com", "Destinatario")
title = inputbox("Escribi el titulo del mensaje", "Titulo")
msj = inputbox("Escribi el mensaje", "Mensaje")
msgbox "Ta pronto! Ahora hace click en aceptar para enviar los mensajes!." & chr(10) & "Nota: para parar de enviar los mensajes cerra el programa en el administrador de tareas." & chr(10) & "El programa envia 1 mensaje por segundo mas o menos.", 0 + 48, "Hace click en aceptar para empezar a enviar"
sub enviar
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "myemail@adinet.com.uy"
objEmail.To = to
objEmail.Subject = title
objEmail.Textbody = msj
objEmail.Configuration.Fields.Item (" = 2
objEmail.Configuration.Fields.Item (" = "mx-adinet.adinet.com.uy"
objEmail.Configuration.Fields.Item (" = 25
objEmail.Configuration.Fields.Item (" = "myemail@adinet.com.uy"
objEmail.Configuration.Fields.Item (" = "mypassword"
objEmail.Configuration.Fields.Item (" = 1
objEmail.Configuration.Fields.Update
objEmail.Send
wscript.sleep(500)
end sub
do
enviar
loop

-------------------------------------

thx a lot. Diego
 
Something like this ?
If MsgBox("Send the message",49,"Some title here")=2 Then
WScript.Quit
End If

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanx. is something like this...but the program sends a lot of mails.. and i must click on accept each mail... i want that the program sends emails while a msgbox is in the desktop, and when i click accept on the msgbox the program Quit..do you understend?
thx
 
You can't have a msgbox out there just waiting for you to say stop to a loop in your script.

--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
Have a look at the WshShell.Popup method (inside a loop).

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
thanks you, it was this what i want to know...
 
i do this:


Set WshShell = CreateObject("WScript.Shell")
do
enviar
parar = WshShell.Popup ("Click en aceptar para parar de enviar mensajes.",1,"Enviando..." , 0)
loop until parar = 1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top