Sending an Email

Can somone please give me an exact code, the simplest u can think of to how to send an email through the submit button, it has to be complete though, and independent, i mean no missing functions nor plugins…

or tell me what i’m doing wrong with what i have…

SMName = new SendMail();

SMName.To = MailAddress

SMName.From = “me@myco.com

SMName.Cc = “”

SMName.Subject = “The State of the Universe”

SMName.Body = “The universe, contrary to what you may have heard, is in none too shabby shape. Not to worry! --me”

SMName.send()

Subject: Sending an Email

Tomas,

The simplest way to send e-mail is with the @MailSend function. That would just be a one line statement. I could never get this @ function to work back in the Notes 4.5 days, so I don’t know if it works now. You haven’t mentioned the context of what you’re doing and if you need to use LotusScript.

As for your LotusScript, you haven’t provided complete code yourself, so I can only guess that SMName is a new NotesDocument.

SMName = new SendMail(); ==> No such thing as SendMail() and don’t end with a semicolon.

SMName.To = MailAddress ==> SendTo, not To

SMName.From = “me@myco.com” ==> You can’t set the from e-mail.

SMName.Cc = “” ==> copyTo, not Cc

SMName.Subject = “The State of the Universe”

SMName.Body = “The universe, contrary to what you may have heard, is in none too shabby shape. Not to worry! --me”

SMName.send() ==> SMName.Send(False)

Ken

Subject: RE: Sending an Email

Tomas,

You also need…

SMName.Form = “Memo”

…before the send.

Ken

Subject: RE: Sending an Email

The problem is i am not using LotusScript, I am using javaScript… because i am using Javascript for field Validations on the form, and because it won’t let me use anything else other than java for the web part…