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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

aspQmail

Status
Not open for further replies.

simplyJ

MIS
Jul 12, 2001
59
US
Can anyone tell me if this is a code or server issue? Here is the mail I am trying to send. When I run this I get an error about the object creation.

<%
' 'sets variables
email = request.form(&quot;email&quot;)

Set Mailer = Server.CreateObject(&quot;SMTPsvg.Mailer&quot;)

Mailer.QMessage = true
Mailer.FromName = &quot;me.com&quot;
Mailer.FromAddress= &quot;me@me.com&quot;
Mailer.RemoteHost = &quot;mail.send.com&quot;
Mailer.AddRecipient email, email
Mailer.Subject = &quot;Your lost username and password&quot;
Mailer.BodyText = &quot;The login Information you requested.&quot; & vbCrlf & vbCrlf

while not objrs.eof
user = objrs.Fields(&quot;username&quot;)
pass = objrs.Fields(&quot;password&quot;)
sendmail.Body = sendmail.Body _
& &quot;Username=&quot; & user & vbCrlf _
& &quot;Password=&quot; & pass & vbCrlf
rsobjrs.Movenext
wend


if Mailer.SendMail then
Response.Write &quot;Mail sent...&quot;
else
Response.Write &quot;Mail send failure. Error was &quot; & Mailer.Response
end if
%>
 
Sounds like your .dll file has not been registered on the server you are trying to use this custom object on...

To register a .dll, go to the MSDOS prompt on the server in question and type:

regsrv32 c:\path\name_of_dll.dll

hope that helps! :)
Paul Prewett
penny.gif
penny.gif
 
I'm not familiar with this but in looking at the code, I wonder about this line:

Response.Write &quot;Mail send failure. Error was &quot; & Mailer.Response

I believe you need another & after Mailer.Response.

Hopefully it's that simple!
br
mark
 
if Mailer.SendMail then
Response.Write &quot;Mail sent...&quot;
else
Response.Write &quot;Mail send failure. Error was &quot; & Mailer.Response
end if

I shouldn't need to concotenate anything after ..error was &quot; & mailer.response. the mailer.response is basically a variable that gets inserted into the string. If the mail doesn't send, it will read,
&quot; Main send failure. Error was 87ydwefrk &quot;

The & sign would only be used if another string or variable was going to be added after the error.

I am new to aspqmail, but I think that is right. The page says I am getting the error when I create the object. Please, tell me if I am wrong.

Thanks for the suggestion though.
 
What was said above is all very well, but I was wondering about aspQmail. What is it?
Is it a component that you intslled?
And the ' Server.CreateObject(&quot;SMTPsvg.Mailer&quot;) '
, is the SMTPsvg valid?

If you are using WinNT 4 or 5 why not use the CDONTS object to send e-mail?


NightWacher
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top