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

ASP Email Type Mismatch

Status
Not open for further replies.

flashnv

Programmer
Dec 4, 2003
3
0
0
IN
Hello!

I am using Persits to send email newsletters to all ids in a database.
The main code is:

While Not rs.EOF
Set sub_email = rs("email")
Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host = "mysite.com" ' Required
Mail.Port = 25 ' Optional.
Mail.FromName = "Newsletter from mysite.com"
Mail.From = "send@mysite.com"
Mail.AddAddress sub_email
Mail.UserName="send@mysite.com"
Mail.Password="cards"
Mail.Subject = my_subject
Mail.Body = my_message & rs("email")
On Error Resume Next
Mail.Send

But I get the following Type Mismatch error:
Type mismatch: 'AddAddress'

What am I doing wrong here?

 
I'm not sure what Mail.addAddress sub_email is but try commenting it out and try it again.

[sup]
[tt]Many .asp question and answers are now in downloadable pdf format and can be found here:[sub] thread333-721855
 
Mail.AddAddress sub_email

Is the only one that doesn't use the equal sign.

try;

Mail.AddAddress=sub_email

MrGreed

"did you just say Minkey?, yes that's what I said."
 
Can't possibly comment it out because the addresses the mail has to be sent to get added by this piece of the code...
 
oops, did not see that. did you try MrGreed's suggestion?

[sup]
[tt]Many .asp question and answers are now in downloadable pdf format and can be found here:[sub] thread333-721855
 
Hi, tried his suggestion to. But it doesn't accept '=' with addAdress! :(
 
isn;t Persists suppose to be Mail.SendToQueue not Mail.Send?

_____________________________________________________________________
onpnt2.gif
[sub]
Hakuna matata!!
[/sub]
 
I haven't used Persists as of yet but it may be syntax specific also and when I looked up a few exmaples the ( ) were enclosing all val's
eg:
Mail.AddAddress(sub_email)



_____________________________________________________________________
onpnt2.gif
[sub]
Hakuna matata!!
[/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top