Method for mailing mail

xiaoxiao2021-03-06  39

1.JMail group mailing method A idea: You refer to: the email address is stored in the MSSQL a user information table, the number is 10,000. The company has a variety of services such as SMTP, POP3, WWW, FTP, MSSQL, DNS, etc. Jmail has a MailMerge object, but the free version cannot be used

Requirements: Use ASP JMAIL to send email to all users with company SMTP

Idea: Directly read the database, send multiple cycles, which will cause great pressure on the server that is not high. It is best to send email to email, each batch of transmission interval, to alleviate the pressure caused by the server.

Implementation: Read the email batch record to RecordSet, use common paging programs, put all records, each page as a batch, how many pages are divided into number of intervals delayed after each page is executed, use to delay the jump reduction execution time: In the loop process, the recirculation is added to the recipient, not to loop, and for i = 1 TO RS.PAGESIZE MSG.AddRecipient RS ("email") rs.movenext next msg.send ("smtp.abc.com") Reduces the mail size loop to add a recipient, which will cause a lot of Email's recipients, Such an email will be large. Therefore, on the basis of the above code, make a judgment in the loop, send it once when the recipient email arrives at 20. That is: for i = 1 TO RS.PAGESIZE MSG.AddRecipient RS ("email") if i mod 20 = 0 Then 'Each 20 recipients send Msg.send ("smtp.abc.com") as an email Msg.clearRecipients 'Clear the sent recipient End if xi xi q ("smtp.abc.com")' Send the remaining page mail.asp contains mail topics, the form of the text,

; an iframe page,