Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sending mails from PB with CC and BCC fields

97 views
Skip to first unread message

Krishna

unread,
May 2, 2008, 6:02:14 AM5/2/08
to
Hi,

How do I send mails from PB using MAPI with CC and BCC
fields?

Please advise.

Thanks in advance,

Krishna,
PA,
Cognizant,
India

Jason 'Bug' Fenter [TeamSybase]

unread,
May 2, 2008, 10:18:43 AM5/2/08
to
The mailRecipient object has a RecipientType property where you can
specify these. The Help files for the various MAPI functions (mailXXX)
should get you started.

--
Off topic:
Sybase has been reviewing NNTP availability and is looking at
alternative ways to build a user community. As a test-bed /
proof-of-concept, I have personally created a community on Ning
(http://powerbuilder.ning.com). While Ning certainly doesn't offer all
of the features that I'd like to see Sybase eventually implement, I am
trying to foster some community involvement on that site. Several of the
TeamSybase members have joined already and are available to answer
questions there.

Please sign up; give it a try. My hope is that it evolves into more than
just a Q&A database, but it won't get there without your participation.

Krishna

unread,
May 6, 2008, 2:32:42 AM5/6/08
to
Hi,

How do I solve this problem?

I used the following steps in the program.

But the mail is not sent. I have used the
MailFileDescription Object for the attachment of a file.
Everything is fine as long as I dont attach any object. If I
do so, I am getting the message "Mail sending failed"

//Instance variables for Mail Session
MailSession ims_session
MailMessage imm_message
mailFileDescription imfd_attach
MailRecipient imr_recipient

If ims_session.maillogon() = MailReturnSuccess! then
imm_message.Recipient[1].name = sle_1.text
imm_message.Recipient[1].RecipientType = MailTo!
imm_message.Recipient[2].name = sle_2.text
imm_message.Recipient[2].RecipientType = MailCc!
imm_message.Recipient[3].name = sle_3.text
imm_message.Recipient[3].RecipientType = MailBcc!
imm_message.Subject = sle_4.text
If sle_5.text <> '' then
imfd_attach.FileType = MailAttach!
imfd_attach.PathName = 'D:\Krishna\data.xls'
imfd_attach.FileName = 'data.xls'
imm_message.attachmentfile[1] = imfd_attach
End If
If ims_session.Mailsend(imm_message) = MailReturnSuccess!
then
MessageBox(title,'Mail successfully sent')
Else
MessageBox(title,'Mail sending failed')
End If
Else
MessageBox(title,"Connectivity to the mail engine
failed",StopSign!)
End If

Bruce Armstrong [TeamSybase]

unread,
May 6, 2008, 9:30:02 AM5/6/08
to

Take a look at the Position attribute of the MailFileDescription
object.

From the online help

=========================================

Position

Unsignedlong

Specifies the position of the attachment file within the message body.
Required when sending multiple attachments.

=========================================

Van

unread,
May 9, 2008, 1:25:37 AM5/9/08
to
you may have to configure an account in the mail configration...
It may be outlook express / Lotus / GroupWise etc..

Regards , Van

<Krishna> wrote in message news:481ffb8a.9f...@sybase.com...

0 new messages