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

JMAIL Attachment.New problem

Status
Not open for further replies.

mellthy

Programmer
Dec 6, 2001
17
CZ
Hi,

I'm trying to send an e-mail with an attachment via JMAIL.

Code:
set msg = Server.CreateObject("JMail.Message")
msg.Logging = true
msg.Silent = true
msg.From = "someone@somewhere"
msg.AddRecipient "me@localhost"
msg.Subject = "a bad try"
msg.Body = "didn't work, did it?"
msg.Charset = "windows-1250"
msg.ContentType = "multipart/mixed; charset=windows-1250"

set Attachments = msg.Attachments
set attachment = Attachment.New("myAttachment.text","text/plain","this is my newtext file")
Attachments.Add(attachment)

msg.Send("localhost")

I'm getting "object requested" error on line with "Attachment.New". Any hints?

Thanks, Gany
 
You have an "s" on the end of Attachment in one place, but not in another. Try this:
Code:
Attachment[b][red]s[/red][/b].New(...)


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Thanks for the hint but it doesn't solve the problem. I did try it before and I only get "object doesn't support this method" error.

The solution lies somewhere else.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top