How to specify the sender's email address or reply-to email address when using PB 10 & Outlook

I have created an application that allows our users to email preformatted messages to customers concerning their orders.  We were using Outlook Express, but now, we are using MS Exchange and MS Outlook.  I cannot specify the sender's email address that should be used by everyone or the reply-to email address (if one exists).

Basically, I need the ability to will allow the different users to send an email to a customer and when the customer replies back to the email, it will go to one email address, as in

I have gotten around the profile issue in that everyone has the same profile name.  But when an email is sent via the application, instead of having the email address in the sender's email address, it has the default email address of the user.

The code that I am using is as follows:

If lb_goodtosend = True Then

      // Create a mail session
      mSes = create mailSession

      // Log on to the session
      mRet = mSes.mailLogon("profilename", "profile password", mailNewSession!)

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

      // Populate the mailMessage structure
      mMsg.Subject = ls_subject
      mMsg.NoteText = ls_message
      li_array = 1
      mMsg.Recipient[li_array].RecipientType = mailTo!
      mMsg.Recipient[li_array].name = ls_sendto
      if ls_copyto <> "" Then
            mMsg.Recipient[li_array].RecipientType = mailcc!
            mMsg.Recipient[li_array].name = ls_copyto
      End If

      // Send the mail
      mRet = mSes.mailSend(mMsg)

      IF mRet <> mailReturnSuccess! THEN
            MessageBox("Mail Send", 'Mail not sent')
      END IF


      DESTROY mSes
End If

Thanks in advance!

Keith Roberts
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

what you need is the mailbox for that user or the on the pc from where you are sending the email
and when you have the mail box on that pc  then
you must use the username and password to login and send mail

 mRet = mSes.mailLogon("profilename", "profile password", mailNewSession!)
                                       username       password

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
In MS SQL2000 you can set up a stored procedure to send emails which would all have the same 'sender' address.  Write your order info / text to a table; set up a scheduled job to query the table at regular intervals; then trigger the stored procedure to retrieve the data from the table, format the message, then send it.
BooBoo2004Author Commented:
Unfortunately, the database idea will not work.  I need to send the email from within an existing email application.  The user will process an order.  If the csr needs more info, the csr will generate an email by selecting the order, clicking a button, and selecting the correct canned text, and then sends the email to the user.

I did discover the Outlook Redemption object and I am fooling around with this.  I will post my results shortly.

Thanks for the rapid response!
BooBoo2004Author Commented:
Please close this question.  No points to be awarded as the question was not answered.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.