Reply from non-authorised mailbox

Status
Not open for further replies.

Erik

Member
Outlook version
Outlook 2013 64 bit
Email Account
Exchange Server
We use a common mailbox as storage file (Public folders cannot be used, don't ask why). All users can save messages there. But when we reply on a message from the storage, we don't want Outlook to use the mailboxname 'Storage' as sender. So this is disallowed, when sending from the storage mailbox, the user has to manually change the 'from'-field to his own account.

But when the user forgets this, there is different behaviour:

- not desired: the mail seems to be sent, but seconds later the user receives a message that this was not allowed and the mail is not sent. So go to your sent item, select the message, resend etc. A lot of clicking.

- desired: there is an immediate popup stating that sending from this mailbox is not allowed.

We use different versions of Outlook (2007-2013), but even between identical Outlook versions there is different behaviour. One user receives a mail, the other user a popup. Does anyone know what affects this behaviour? How can we force it to show a popup?

Or even better: can I force Outlook to always use my main account? There is a setting 'Always use the default account', but this has no affect when replying to messages.
 
Erik,

I've just been playing with a couple of scripts (my goal is different, it's to forward on an email to a support system using the original senders emails address).

Can i offer an idea?

A little VBA to do the following:

Keep in mind this isn't a fully filled out idea, and someone else will know better :) This is just what I would do (unless told otherwise).

Code:
Sub ReplyonBehalfof()  
   'source:    http://community.spiceworks.com/how_to/show/1964-add-a-button-to-outlook-that-will-forward-an-e-mail-to-the-helpdesk-as-a-new-ticket
   'source:    http://support.microsoft.com/Kb/Q232309 (on behalf of)
  
 
Dim helpdeskaddress As String 
 
Dim objMail As Outlook.MailItem 
 
Dim strbody As String 
 
Dim oldmsg As String 
 
Dim senderaddress As String 
 
Dim addresstype As Integer 
 
Set objitem = GetCurrentItem() 
 
Set objMail = objitem.Reply 
 
objMail.SentOnBehalfOfName = "Your Account Name"  'found in Account Settings/Name 
 
' Sender E=mail Address 
 
senderaddress = objMail.SentOnBehalfOfName 
 
'Searches for @ in the email address to determine if it is an exchange user 
 
addresstype = InStr(senderaddress, "@") 
 
' If the address is an Exchange DN use the Senders Name 
 
If addresstype = 0 Then 
 
senderaddress = objMail.SentOnBehalfOfName 
 
End If 
 
'adds the senders e-mail address as the created by object for the ticket and appends the message body 
 
strbody = vbNewLine & vbNewLine & objitem.Body 
 
objMail.Subject = "RE: " & objitem.Subject 
 
objMail.SentOnBehalfOfName = senderaddress 
 
' remove the comment from below to display the message before sending 
 
objMail.Display 
 
'Automatically Send the ticket 
 
'objMail.Send 
 
Set objitem = Nothing 
 
Set objMail = Nothing 
 
End Sub 
 
Function GetCurrentItem() As Object 
 
Dim objApp As Outlook.Application 
 
Set objApp = Application 
 
On Error Resume Next 
 
Select Case TypeName(objApp.ActiveWindow) 
 
Case "Explorer" 
 
Set GetCurrentItem = _ 
 
objApp.ActiveExplorer.Selection.Item(1) 
 
Case "Inspector" 
 
Set GetCurrentItem = _ 
 
objApp.ActiveInspector.currentItem 
 
Case Else 
 
End Select 
 
End Function

The problem would be you would need to get all users to implement the VBA, however whenever you replied to an email marked from that storage unit it would automatically adjust to use your main account.
 
Thanks for your reply. I'll play with this script for a bit.

Of course, it is somewhat 'working around the problem' instead of fixing the problem. I would rather have Outlook respond to my forgetfullnes with a popup. Using a script means that I have to remember to use a different button when responding to an email, which is similar to remembering to manually change the From-address.

Erik,

I've just been playing with a couple of scripts (my goal is different, it's to forward on an email to a support system using the original senders emails address).

Can i offer an idea?

A little VBA to do the following:

> ..
 
Diane,

All users can write, delete, move, make folders, etc. The only right we don't have is sending on behalf of the account. It's a hosted Exchange, I've asked the administrator how it's set up technically.

(unfortunaltely, they weren't able to help me on this question).

Erik

The always use default account applies to new messages, not replies. What permissions do the users have to the shared mailbox?
 
If your mail was easily identifiable somehow, category, unique email (ie you wouldn't otherwise send an email to them), etc why not look at adapting an easy little VBA such as ..

If category = ID then

msg box warning.

Diane posted another script in a topic earlier that checked for a subject, that could be adapted.

I'd share mine I have but I'm not at my PC to get it.

As long as you have something unique to that process (even subject text you can search in) you can have a custom prompt unless you want it to prompt on every mail.

:)
 
I want to get the popup when sending a message from an account that is not my own. I like your suggestion. Can I get some VBA script to trigger everytime I press the Send button?

If your mail was easily identifiable somehow, category, unique email (ie you wouldn't otherwise send an email to them), etc why not look at adapting an easy little VBA such as ..

If category = ID then

msg box warning.

Diane posted another script in a topic earlier that checked for a subject, that could be adapted.

I'd share mine I have but I'm not at my PC to get it.

As long as you have something unique to that process (even subject text you can search in) you can have a custom prompt unless you want it to prompt on every mail.

:)
 
Erik,

Try changing this:

This is all you need to check for attachments - it looks for the word attach in the message body.

Code:
Private WithEvents oItem As MailItem 
 
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
  If InStr(1, Item.Body, "attach", vbTextCompare) > 0 Then
       If Item.Attachments.Count = 0 Then
         answer = MsgBox("There's no attachment, send anyway?", vbYesNo)
         If answer = vbNo Then Cancel = True
       End If
  End If 
 
End Sub

for reply all, see http://www.outlookcode.com/codedetail.aspx?id=1299



Change the subject search to item.SenderName = sender name

You'd need the right object info though, but it's easy to find 'right click, object' menu in the VBA screen.

Sorry I can't be more precise but I don't have access to my code.

It will trigger every time you send an email from the account you nominate.

Check my thread about MoveAgedMail I might have included the right item.Sender object in there :)
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
N Reply to Outlook messages by moving messages to a specific Outlook folder Outlook VBA and Custom Forms 1
J Macro to Reply to Emails w/ Template Outlook VBA and Custom Forms 3
J Quick steps delete original email and move reply/sent email to folder Using Outlook 2
nmanikrishnan Auto-reply from default account Using Outlook 1
P Automatic Greeting "Hello Name," when Reply All is clicked Outlook VBA and Custom Forms 1
N Line to move origEmail to subfolder within a reply macro Outlook VBA and Custom Forms 0
A Outlook 2016 Macro to Reply, ReplyAll, or Forward(but with composing new email) Outlook VBA and Custom Forms 0
S How to find emails that I sent that have not received a reply? Using Outlook 7
T Macro to move reply and original message to folder Outlook VBA and Custom Forms 6
A Is there an ID field you can use to pair a reply to the sent email? Outlook VBA and Custom Forms 4
W Reply to email Using Outlook 4
A Edit attachment Save and Reply Outlook VBA and Custom Forms 0
L Macro/VBA to Reply All, with the original attachments Outlook VBA and Custom Forms 2
S Outlook Macro to move reply mail based on the key word in the subjectline Outlook VBA and Custom Forms 0
diver864 vba for a rule to automatically accept meeting requests with 'vacation' in subject, change to all-day event, change to free, don't send reply Outlook VBA and Custom Forms 1
B Adding signature to bottom of VBA reply email Outlook VBA and Custom Forms 1
C UDFs Reply vs Forward Outlook VBA and Custom Forms 3
ThinkToday Calculate reply time of outlook mail Using Outlook 1
W Replyin to the reply-to email address Outlook VBA and Custom Forms 0
D Reply with a template loose the sender's embedded image Outlook VBA and Custom Forms 0
R List folders in a combo box + select folder + move emails from inbox to that folder + reply to that email Outlook VBA and Custom Forms 1
J Outlook Reply > From > Other Email Address... > Address Not Showing in Sent Items... From Email Outlook VBA and Custom Forms 0
M Delete headers in Inline reply Outlook VBA and Custom Forms 5
E reply Using Outlook 0
Healy Consultants Macro to remove inside organization distribution list email address when reply to all recepients Outlook VBA and Custom Forms 0
B resend if no reply and send an automatic reminder Outlook VBA and Custom Forms 0
evdbogaard Reply with only last message cited Using Outlook 1
B Reply and replyall macro is not working Outlook VBA and Custom Forms 1
mctabish Setting "Reply To" based on inbox Outlook VBA and Custom Forms 2
Rupert Dragwater Deleted email address keeps showing up in reply Using Outlook 12
B When working on emails in a certain folder, when I hit reply or reply all, I would like it re always reply all and add an email address to send to Outlook VBA and Custom Forms 3
R How Do I insert images in and Auto Reply Using Outlook 3
D Disable or hide "reply" and "reply to all" and "forward" in email from access vba Outlook VBA and Custom Forms 1
M Reply Inline With a Outlook Template Outlook VBA and Custom Forms 6
broadbander Needing help with reply/reply all while keeping attachments and adding a new CC recipient. Outlook VBA and Custom Forms 5
O On click,I want to change subject line of selected mail and then reply to particular email and move Using Outlook 3
J VBA Run When Reply Outlook VBA and Custom Forms 4
D Font in Reply is much larger than normal, how to reset ...? Using Outlook 4
K add pdf to every reply or forward Outlook VBA and Custom Forms 1
A VB to "reply all" email items stored in a folder of outlook with adding a new message Outlook VBA and Custom Forms 0
K Extract email address from body and auto-reply outlook Using Outlook 1
T In-line reply style in Outlook Outlook VBA and Custom Forms 20
Vijay Reply all by attachment name Using Outlook 10
N Lookup Value From Excel and Reply With Matching Value Using Outlook 0
G Outlook 2016: reply icon not showing when replied from mobile Using Outlook 3
J Remove extra line above signature in reply Outlook VBA and Custom Forms 5
ashcosta2 Auto Reply rule based on speficied time Outlook VBA and Custom Forms 0
C Outlook Attachment List in Reply Header Using Outlook 3
D Reply Problem with Outlook.com account Using Outlook.com accounts in Outlook 0
H send reminder if no reply received on first or original email using macro Using Outlook 2

Similar threads

Back
Top