By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,225 Members | 2,187 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,225 IT Pros & Developers. It's quick & easy.

CDO mail dies before reaching the recipients

P: 1
HI ,
I moved my website to new server so sending mail stop working
-I got no error when sending mail but no results
-smtp service is running .. i telnet smtp.gmail.com 25 which work
-I found that my mail endup in badmail box

my code is like this

<%@LANGUAGE="VBSCRIPT" %>
<% Server.ScriptTimeout = 999999999 %>

<html>
<head>
<title>newsletter</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1255">

<body>

<%
if request.form.count=0 then
%>
<form action="cdo_sys.asp" method="post">
<input name="email1" type="submit" value="send">
</form>
<%
'#####cheking for email true
'If Len(strReturnEmailAddress) < 5 OR NOT Instr(1, strReturnEmailAddress, " ") = 0 OR InStr(1, strReturnEmailAddress, "@", 1) < 2 OR InStrRev(strReturnEmailAddress, ".") < InStr(1, strReturnEmailAddress, "@", 1) Then
'strReturnEmailAddress = strMyEmailAddress
'End If

else%>

<!--#include file="includes/adovbs.inc"-->


<%dim conn,rs,str,sql

Str = "DSN=test-news; user Id=sa; password=xxxxx;"
Set conn=server.createobject("ADODB.Connection")
conn.open Str

set rs=server.CreateObject("ADODB.recordset")%>

<%

Dim HTML, html2

'******************


%>


<%

'******************
sql="select * from UserList where ListType<3 and Lang=2;"
rs.Open sql, Conn,1,3


while not rs.eof
Set objSendMail = CreateObject("CDO.Message")

objSendMail.from = "news@abc.com"
objSendMail.To = rs.fields("EmailAdress")
objSendMail.Subject ="news"
objSendMail.CreateMHTMLBody "http://www.abc.com/news/aaa_07_h.html"
objSendMail.BodyPart.Charset = "windows-1255"
objSendMail.ReplyTo = "info@abc.com"
objSendMail.Send
Set objSendMail = nothing
rs.movenext
wend

Response.Write "Email has been sent to"


%>
<%= rs.recordcount %>
<%=" recip" %>

<% End If %>

</body>
</html>
Oct 30 '07 #1
Share this Question
Share on Google+
4 Replies


jhardman
Expert 2.5K+
P: 3,405
The problem is that spammers are constantly trying new ways to send out email using server-side scripts. Because of this, a lot of email programs (like gmail) try to detect if the mail didn't come from a real email program and block it if that is the case. Unfortunately, I don't know a good solution, I'm struggling with this problem myself.

Jared
Oct 31 '07 #2

codegecko
Expert 100+
P: 533
I would suggest trying SPF records (see http://www.microsoft.com/mscorp/safe...nderid/wizard/) on your domain and see if GoogleMail accepts it then.

Failing that, just get your user to check their spam folder for over-zealous activity (i.e. marking nearly everything they/you receive/send as spam). A computer is only as good as the person that told it what to do!

Best regards,

medicineworker
Oct 31 '07 #3

jhardman
Expert 2.5K+
P: 3,405
I would suggest trying SPF records (see http://www.microsoft.com/mscorp/safe...nderid/wizard/) on your domain and see if GoogleMail accepts it then.

Failing that, just get your user to check their spam folder for over-zealous activity (i.e. marking nearly everything they/you receive/send as spam). A computer is only as good as the person that told it what to do!

Best regards,

medicineworker
I use a remote SMTP server which makes me feel a little helpless; after all, my server should be able to send its own email, right? I looked into SPF and the implementation didn't look that easy. Have you actually done this yourself?

Jared
Nov 2 '07 #4

codegecko
Expert 100+
P: 533
I use a remote SMTP server which makes me feel a little helpless; after all, my server should be able to send its own email, right? I looked into SPF and the implementation didn't look that easy. Have you actually done this yourself?

Jared
Hi Jared,

SPF is a doddle to set up under one proviso: that your domain host allows you to create and/or utilise TXT records. I set up my SPF to be valid from any IP (because I use dynamic IP) and from my domain and all subdomains. Took all of 5 minutes to get the text to put in the SPF record, then two minutes to add the TXT record to my DNS records.

It really is as simple as that! Check out the link earlier in the forum to Microsoft's SPF Wizard - nice and user-friendly, it walks you through your requirements for an SPF record then gives you the text to stick into the TXT entry.

Hope it helps!

medicineworker
Nov 2 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.