A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Tags: , , , , , ,

MAPI created Outlook message has wrong Message Type





 
 
Thread Tools Display Modes
  #1  
Old December 8th 07, 07:00 PM posted to microsoft.public.outlook.program_vba
dougolivier
external usenet poster
 
Posts: 2
Default MAPI created Outlook message has wrong Message Type

I am creating an email message in PB10 with an attachment. It gets into
Outlook without a problem, but somehow the Outlook Message Type which should
be SMTP
is overridden with the email address that I assign to the recipient address
field. Is there someplace that I can force the message type or am I doing
something wrong. Is there some field that I should search for to make sure
that I'm not setting something wrong... Is there a good reference site for
email variables and how to properly use them?

Thanks, Douglas



Below is my code:

string notetext, filename
mailSession mSes
mailReturnCode mRet
mailMessage mMsg
mailRecipient mRecip
mailFileDescription mAttach

// Create a mail session
mSes = create mailSession

// Log on to the session
mRet = mSes.mailLogon(mailNewSession!)

IF mRet mailReturnSuccess! THEN
MessageBox("Mail", 'Logon failed.')
RETURN
END IF

// Populate the mailMessage structure
mMsg.Subject = subject

notetext = fw_email_text(curr_row)
if isNull(notetext) then notetext = '...Message is Intentially Blank...'
mMsg.notetext = notetext

filename = "attach.pdf"

if fileexists(g_ini_settings.file_directory +"\"+filename) then
mattach.filename = filename
mattach.pathname = g_ini_settings.file_directory +"\"+filename
mMsg.AttachmentFile[1] = mAttach
end if

mMsg.Recipient[1].name = email_name
mMsg.Recipient[1].address = email_add


// Send the mail
mRet = mSes.mailSend(mMsg)
IF mRet mailReturnSuccess! THEN
MessageBox("Mail Send", 'Mail not sent to '+email_name)
RETURN
END IF

filedelete(g_ini_settings.file_directory +"\"+filename)
mSes.mailLogoff()
DESTROY mSes

return






Ads
  #2  
Old December 10th 07, 06:14 AM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 1,522
Default MAPI created Outlook message has wrong Message Type

Do you mean the *recipient* address type (such as SMTP)?
Whta exactly are you using? I do not recognize the method calls (mailLogon,
mailLogoff, etc).

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"dougolivier" wrote in message
...
I am creating an email message in PB10 with an attachment. It gets into
Outlook without a problem, but somehow the Outlook Message Type which
should be SMTP
is overridden with the email address that I assign to the recipient
address
field. Is there someplace that I can force the message type or am I doing
something wrong. Is there some field that I should search for to make
sure
that I'm not setting something wrong... Is there a good reference site
for
email variables and how to properly use them?

Thanks, Douglas



Below is my code:

string notetext, filename
mailSession mSes
mailReturnCode mRet
mailMessage mMsg
mailRecipient mRecip
mailFileDescription mAttach

// Create a mail session
mSes = create mailSession

// Log on to the session
mRet = mSes.mailLogon(mailNewSession!)

IF mRet mailReturnSuccess! THEN
MessageBox("Mail", 'Logon failed.')
RETURN
END IF

// Populate the mailMessage structure
mMsg.Subject = subject

notetext = fw_email_text(curr_row)
if isNull(notetext) then notetext = '...Message is Intentially Blank...'
mMsg.notetext = notetext

filename = "attach.pdf"

if fileexists(g_ini_settings.file_directory +"\"+filename) then
mattach.filename = filename
mattach.pathname = g_ini_settings.file_directory +"\"+filename
mMsg.AttachmentFile[1] = mAttach
end if

mMsg.Recipient[1].name = email_name
mMsg.Recipient[1].address = email_add


// Send the mail
mRet = mSes.mailSend(mMsg)
IF mRet mailReturnSuccess! THEN
MessageBox("Mail Send", 'Mail not sent to '+email_name)
RETURN
END IF

filedelete(g_ini_settings.file_directory +"\"+filename)
mSes.mailLogoff()
DESTROY mSes

return








  #3  
Old December 11th 07, 12:20 PM posted to microsoft.public.outlook.program_vba
dougolivier
external usenet poster
 
Posts: 2
Default MAPI created Outlook message has wrong Message Type

Yes... I mean recipient address type. The outlook message will not send and
when I click on the TO address and it displays the name, email address, and
type... there is a button that is labeled INTERNET which will set the field
to SMTP. Somehow Powerbuilder is setting this field to the email address
when it creates the message. I writing in Powerbuilder 10.

Thanks,


"Dmitry Streblechenko" wrote in message
...
Do you mean the *recipient* address type (such as SMTP)?
Whta exactly are you using? I do not recognize the method calls
(mailLogon, mailLogoff, etc).

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"dougolivier" wrote in message
...
I am creating an email message in PB10 with an attachment. It gets into
Outlook without a problem, but somehow the Outlook Message Type which
should be SMTP
is overridden with the email address that I assign to the recipient
address
field. Is there someplace that I can force the message type or am I
doing
something wrong. Is there some field that I should search for to make
sure
that I'm not setting something wrong... Is there a good reference site
for
email variables and how to properly use them?

Thanks, Douglas



Below is my code:

string notetext, filename
mailSession mSes
mailReturnCode mRet
mailMessage mMsg
mailRecipient mRecip
mailFileDescription mAttach

// Create a mail session
mSes = create mailSession

// Log on to the session
mRet = mSes.mailLogon(mailNewSession!)

IF mRet mailReturnSuccess! THEN
MessageBox("Mail", 'Logon failed.')
RETURN
END IF

// Populate the mailMessage structure
mMsg.Subject = subject

notetext = fw_email_text(curr_row)
if isNull(notetext) then notetext = '...Message is Intentially Blank...'
mMsg.notetext = notetext

filename = "attach.pdf"

if fileexists(g_ini_settings.file_directory +"\"+filename) then
mattach.filename = filename
mattach.pathname = g_ini_settings.file_directory +"\"+filename
mMsg.AttachmentFile[1] = mAttach
end if

mMsg.Recipient[1].name = email_name
mMsg.Recipient[1].address = email_add


// Send the mail
mRet = mSes.mailSend(mMsg)
IF mRet mailReturnSuccess! THEN
MessageBox("Mail Send", 'Mail not sent to '+email_name)
RETURN
END IF

filedelete(g_ini_settings.file_directory +"\"+filename)
mSes.mailLogoff()
DESTROY mSes

return












  #4  
Old December 11th 07, 04:58 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 1,522
Default MAPI created Outlook message has wrong Message Type

Is that PB's Simple MAPI wrapper? I have no idea what it does., sorry.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"dougolivier" wrote in message
...
Yes... I mean recipient address type. The outlook message will not send
and when I click on the TO address and it displays the name, email
address, and type... there is a button that is labeled INTERNET which will
set the field to SMTP. Somehow Powerbuilder is setting this field to the
email address when it creates the message. I writing in Powerbuilder 10.

Thanks,


"Dmitry Streblechenko" wrote in message
...
Do you mean the *recipient* address type (such as SMTP)?
Whta exactly are you using? I do not recognize the method calls
(mailLogon, mailLogoff, etc).

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"dougolivier" wrote in message
...
I am creating an email message in PB10 with an attachment. It gets into
Outlook without a problem, but somehow the Outlook Message Type which
should be SMTP
is overridden with the email address that I assign to the recipient
address
field. Is there someplace that I can force the message type or am I
doing
something wrong. Is there some field that I should search for to make
sure
that I'm not setting something wrong... Is there a good reference site
for
email variables and how to properly use them?

Thanks, Douglas



Below is my code:

string notetext, filename
mailSession mSes
mailReturnCode mRet
mailMessage mMsg
mailRecipient mRecip
mailFileDescription mAttach

// Create a mail session
mSes = create mailSession

// Log on to the session
mRet = mSes.mailLogon(mailNewSession!)

IF mRet mailReturnSuccess! THEN
MessageBox("Mail", 'Logon failed.')
RETURN
END IF

// Populate the mailMessage structure
mMsg.Subject = subject

notetext = fw_email_text(curr_row)
if isNull(notetext) then notetext = '...Message is Intentially Blank...'
mMsg.notetext = notetext

filename = "attach.pdf"

if fileexists(g_ini_settings.file_directory +"\"+filename) then
mattach.filename = filename
mattach.pathname = g_ini_settings.file_directory +"\"+filename
mMsg.AttachmentFile[1] = mAttach
end if

mMsg.Recipient[1].name = email_name
mMsg.Recipient[1].address = email_add


// Send the mail
mRet = mSes.mailSend(mMsg)
IF mRet mailReturnSuccess! THEN
MessageBox("Mail Send", 'Mail not sent to '+email_name)
RETURN
END IF

filedelete(g_ini_settings.file_directory +"\"+filename)
mSes.mailLogoff()
DESTROY mSes

return














 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
outlook web access - I cant type text in reply message or new mess Amy Outlook - General Queries 1 November 20th 07 11:05 PM
can't type in message box L Outlook - General Queries 3 March 28th 07 03:00 AM
How does Outlook 2003 handle the MIME type message/rfc822? veganwa.ng@gmail.com Outlook - General Queries 0 March 13th 07 03:18 PM
How does Outlook 2003 handle the MIME type message/rfc822? veganwa.ng@gmail.com Outlook - General Queries 0 March 13th 07 01:22 PM
Outlook Express 6 freezes when I begin to type a new message. PC User Outlook Express 1 January 14th 06 04:25 PM


All times are GMT +1. The time now is 01:30 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2008 Outlook Banter, part of the NewsgroupBanter project.
The comments are property of their posters.
Debt - Credit Cards - vShare YouTube Clone - Xbox Mod Chip - Free Credit Report