MIME email creation in lotusscript and "sender"

OK, I’ve thrown in the towel for now. Hope you can help.

I am sending out an email in script and would simply like to make the “Sender” be what I tell it to be.

I’ve tried setting the following fields:

mail.Principal = “me@work.com@NotesDomain

mail.InetFrom = “me@work.com

mail.From = “Joseph Hoetzl me@work.com

mail.ReplyTo = “Joseph Hoetzl me@work.com

mail.~$INetPrincipal = “Joseph Hoetzl <me@work.com@NotesDomain>”

mail.Sender = “Joseph Hoetzl me@work.com

I’ve tried setting it at the end of the mime stream, before it, etc…

I’ve tried using just from and inetfrom in mime headers, I’ve read:

http://www.codestore.net/store.nsf/cmnts/2216641500D0427B8025712C0074BAB6?OpenDocument

and

http://my.advisor.com/doc/17381?open&p=6&pid=ztdbms

And many other examples - I just don’t seem to be able to get the sender to be what I’d like. Even went as far as spelling principal as principle :slight_smile:

Anyone else having a problem with this?

Any tips?

Thank you!

Subject: RE: MIME Sender

It’s in the MIME Header… you’ll need to create the message as a MIME document…

Are you using the NotesMIMEEntity class in the creation?

Marc Resnick

Gear Up Technologies

Subject: Yes, I tried using NotesMIMEEntity and NotesMIMEHeader

Hi, thanks for responding. I am using NotesMIMEEntity and NotesMIMEHeader.- just like on those sites I posted -

My code extract:

'Send HTML mail

session.ConvertMIME = False ’ Do not convert MIME to rich text

Dim body As NotesMIMEEntity

Dim header As NotesMIMEHeader

Dim stream As NotesStream

Dim child As NotesMIMEEntity

Set stream = session.CreateStream

Set body = mail.CreateMIMEEntity

Set header = body.CreateHeader({MIME-Version})

Call header.SetHeaderVal(“1.0”)

Set header = body.CreateHeader(“Sender”)

Call header.SetHeaderVal({“Joseph Hoetzl” me@work.com})

Set header = body.CreateHeader(“Principal”)

Call header.SetHeaderVal({“Joseph Hoetzl” me@work.com})

Set header = body.CreateHeader(“From”)

Call header.SetHeaderVal({“Joseph Hoetzl” me@work.com})

I’ve tried doing this at the end of the stream for the body, tried to multipart message with text and html, just doesn’t seem to be doing it.

Thanks!

Subject: Are you putting it in the mail.box

or sending it via the persons mail file?

If you put in the mail.box it will go as is otherwise it will be changed to match the mail file owner.

Subject: Changed from r5 - doh!?

Ah, changed around r5 - right? Looking for that mail(i).box finder or just writing one I guess now…

Well, I could hard code it to mail1.box since I know we have that…but sloppy :slight_smile: