ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 22nd, 2004, 12:10 AM
jyothi jyothi is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 2 jyothi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile "From" Address wants to change dynamically from VB using MAPI Componenets.

Hi,

Please help me to solve my problem.

Using MAPI Componenets I am able to send Emails successfully. Now I want to send Emails behalf of my superior. He added me in his delegates list. I am able to send emails behalf of him from Outlook. I want to do this job throough VB. I want to pass the "From" address in runtime.
I tried with using of MAPIMessage. MsgOrigDisplayName = users.username -- Error: 383 Read-Only Property.
Here the function:

Public Function SendMessage(ByVal SendTo As String, ByVal Subject As String, Attachment() As String) As Boolean
'automatically fill up the email server, ie. groupwise with the information
'such as subject and attachment.
On Error GoTo Err_Handler
Dim I As Integer


With m_Form.Message
.SessionID = m_Form.Session.SessionID
.Compose

If Subject <> "" Then .MsgSubject = Subject

'populate the sent to text box automatically if
'the project provides an email address.

If Not SendTo = "" Then
.RecipIndex = 0
.RecipType = 1 'RECIP_TYPE_TO
.RecipDisplayName = SendTo
' .MsgOrigDisplayName = user.username
'.RecipAddress = SendTo
'.ResolveName
End If

'we have to provide more than one space for each attachment.
'otherwise an error will be generated when using groupwise
'outlook does not have this problem.
If frmShipment.blshipment = False Then
.MsgNoteText = Space(UBound(Attachment) + 1) & vbCrLf _
& "The attached file needs PDF Reader to open, if you don't have the PDF Reader software on your machine, you can download the software FREE from http://www.adobe.com/products/acrobat/alternate.html"
Else
.MsgNoteText = Space(UBound(Attachment) + 1)
End If
For I = LBound(Attachment) To UBound(Attachment)

If Attachment(I) <> "" Then
.AttachmentIndex = .AttachmentCount
.AttachmentPosition = .AttachmentIndex
.AttachmentPathName = (Attachment(I))
End If
Next I

If frmUnconfirmedShip.blEmail = True Then
.Send False 'send email Directly

Else
.Send True 'display the send dialog window.

End If
End With

On Error Resume Next
AppActivate "Mail From"

m_ErrorMessage = ""
SendMessage = True

Exit Function

Err_Handler:
m_ErrorMessage = Err.Number & " " & Err.Description
SendMessage = False
End Function


Appreciable for early response. TQ.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > "From" Address wants to change dynamically from VB using MAPI Componenets.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT