Visual Basic - ¿Cuantos correos puedo mandar en VB 6 con SMTP?

Life is soft - evento anual de software empresarial
   
Vista:

¿Cuantos correos puedo mandar en VB 6 con SMTP?

Publicado por mallu1983 (1 intervención) el 18/05/2009 08:29:29
Buenas,

Tengo un procedimiento de envio masivo de correos. Funciona correctamente aunque me dado cuenta de que voy a tener que mandar a 3000 direcciones de correo y me han entrado dudas de si hay un limite de emails dentro del mismo correo con servidor SMTP y programa hecho en VB 6.Este es el codigo.

Private Sub FormatMSG()
NotificadorSMTP.Refresh
Dim d As Byte
Dim fileB64 As String
If Dir(App.Path & "email.eml") <> "" Then Kill (App.Path & "email.eml")
Call WriteStatus("Formando Mensaje...." & vbCrLf)
Asunto = SUBJECT
remitente = REMI_DES & " <" & REMI_VAR & ">"
str1 = DEST_VAR
pos = InStr(1, DEST_VAR, ";", vbTextCompare)
While Not pos = 0
Mid(DEST_VAR, pos, 1) = ", "
pos = InStr(pos + 1, DEST_VAR, ";", vbTextCompare)
Wend
destinatario = DEST_VAR
DEST_VAR = str1
'MsgBox FILES_VAR
mailstring = "From: " & remitente & vbCrLf & "To: " & destinatario & vbCrLf & "Subject: " & Asunto & vbCrLf & Text6.Text & vbCrLf & Text2.Text & vbCrLf & Text3.Text & vbCrLf & BODY & vbCrLf & vbCrLf
If Len(FILES_VAR) = 0 Then
mailstring = mailstring & vbcrl & Text2.Text & "--"
EMLFILE = FreeFile
Open App.Path & "email.eml" For Binary As EMLFILE
ProgressBar1.Max = Len(mailstring) + 10
ProgressBar1.Value = 0
For t = 1 To Len(mailstring)
Put EMLFILE, , CByte(Asc(Mid(mailstring, t, 1)))
Next
Close (EMLFILE)
Else
EMLFILE = FreeFile
Open App.Path & "email.eml" For Binary As EMLFILE
ProgressBar1.Max = Len(mailstring) + 10
ProgressBar1.Value = 0
For t = 1 To Len(mailstring)
Put EMLFILE, , CByte(Asc(Mid(mailstring, t, 1)))
Next
mailstring = ""
pos = InStr(1, FILES_VAR, ";", vbTextCompare)
While pos <> 0
pfile = Mid(FILES_VAR, 1, pos - 1)
FILES_VAR = Right(FILES_VAR, Len(FILES_VAR) - (Len(pfile) + 1))
If Dir(pfile) <> "" Then
For t = 0 To Len(pfile) - 1
pfname = Mid(pfile, Len(pfile) - t, t)
If Left(pfname, 1) = "" Then
pfname = Right(pfile, t)
Exit For
End If
Next
Call WriteStatus("Adjuntando " & pfname & "...." & vbCrLf)
mailstring = mailstring & vbcrl & Text2.Text & vbCrLf
mailstring = mailstring & Left(Text4.Text, Len(Text4.Text) - 2) & Chr(34) & pfname & Chr(34) & vbCrLf
mailstring = mailstring & Left(Text5.Text, Len(Text5.Text) - 2) & Chr(34) & pfname & Chr(34) & vbCrLf & vbCrLf
For t = 1 To Len(mailstring)
Put EMLFILE, , CByte(Asc(Mid(mailstring, t, 1)))
Next
mailstring = ""
Call FileCodB64(CStr(pfile))
End If
pos = InStr(1, FILES_VAR, ";", vbTextCompare)
Wend
pfile = Trim(FILES_VAR)
If Dir(pfile) <> "" Then
For t = 0 To Len(pfile) - 1
pfname = Mid(pfile, Len(pfile) - t, t)
If Left(pfname, 1) = "" Then
pfname = Right(pfile, t)
Exit For
End If
Next
Call WriteStatus("Adjuntando " & pfname & "...." & vbCrLf)
mailstring = mailstring & vbcrl & Text2.Text & vbCrLf
mailstring = mailstring & Left(Text4.Text, Len(Text4.Text) - 2) & Chr(34) & pfname & Chr(34) & vbCrLf
mailstring = mailstring & Left(Text5.Text, Len(Text5.Text) - 2) & Chr(34) & pfname & Chr(34) & vbCrLf & vbCrLf
For t = 1 To Len(mailstring)
Put EMLFILE, , CByte(Asc(Mid(mailstring, t, 1)))
Next
mailstring = ""
Call FileCodB64(CStr(pfile))
End If
mailstring = mailstring & vbCrLf & Text2.Text & "--"
For t = 1 To Len(mailstring)
Put EMLFILE, , CByte(Asc(Mid(mailstring, t, 1)))
Next
mailstring = ""
End If
Close (EMLFILE)
'enviar mensajes SMTP a los Destinatarios
Call WriteStatus("Asignando Destinatarios...." & vbCrLf)
pos = InStr(1, DEST_VAR, ";", vbTextCompare)
While Not pos = 0
Mid(DEST_VAR, pos, 1) = " "
pos = InStr(pos + 1, DEST_VAR, ";", vbTextCompare)
Wend
rcpt = DEST_VAR
Call WriteStatus("Enviando...." & vbCrLf)
Call SendSMTPMsg(Trim(rcpt))
End Sub

Private Sub SendSMTPMsg(rcpt)
PASO = 0
If wsk.State = sckClosed Then
ORIG = REMI_VAR
DEST = rcpt
wsk.Protocol = sckTCPProtocol
wsk.RemoteHost = SMTP_SERVER
wsk.RemotePort = SMTP_PORT
wsk.Connect
End If
End Sub
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder