E
.-=] ExTrEmE [=-.
Hi all!
I hope you can understand my english
I'll explain my question.
In my office we use an old html form to send some short infos to an email
account, by a simple mailto: link.
We use Office 2003 and exchenge mail accounts.
Each worker have a personal mail account and can access to shared office
mailbox.
For some reasons(little stupit in my opinion.. :-/ ) the mail with form data
need to be sent from office mailbox, and should be found in the same account
sent box.
Normally any worker configure outlook with personal mail box as primary and
office shared as secondary, but this configuration force the worker to
reconfigure outlook to send form data (office as primary, personal as
secondary).
A waste of time.. and little boring.
I'll want to make all more simple and speedy.
I'd wrote the vb script do send my form data by mail from specified account,
using Outlook objects.
Let see (sorry mix of italian and english for variables and comments
)...
<script language="vbscript">
Sub Invia_Mail(Destinatario, Oggetto , CorpoMail, InviatoDa)
'Crea l'oggetto outlook
Dim Outlook
Set Outlook = CreateObject("Outlook.Application")
'Crea l'oggetto messaggio
Dim Message
Set Message = Outlook.CreateItem(olMailItem)
With Message
.Subject = Oggetto
.HTMLBody = CorpoMail 'qui creo via script il mio body in html a
partire dai dati inseriti nel form html
'Aggiungiamo il destinatario
.Recipients.Add (Destinatario)
'se è stato inserito un indirizzo email dal quale deve partire la mail,
lo si imposta qui
If Len(InviatoDa) > 0 Then .SentOnBehalfOfName = InviatoDa
'e adesso inviamo
.Send
End With
End Sub
</script>
All fork fine. Mail built and sent. Wow :-D
But there are some things that don't go.
And there a question that I leave at last (the main reason for my post).
1) Some security messages are shown before mail being sent, with the obvious
request to start or not mail message. I think there's no way (obvious) to
workaround this by script.. but there's a local security setting to avoid
this request?
2) Next i found that mail in outbox.. but it not go away!! Clicking on
sent/receive take no effects! The only way is to click on time on outbox...
the mail start immediately (????).
Is it a local problem.. or a bug.. or something else?
3) Now come my real question
All beautiful, all work.. goooood! NOT!
My sent mail be placed on my personal account if configured as primary :°(
I need it to be in the sent box of office account!
I want to check by script the "From" account.. and if personal account found
i need to make a copy of the message (or move) and place it in the office
Sent Box.
There's a problem.. How can I do it? :-D
I've asked to Dr. Google but now I'm little confused
3b) There's a way to check the configured accounts before all my damn
things? How?
I hope someone give me the light to show me the way
Many Thanks!
I hope you can understand my english
I'll explain my question.
In my office we use an old html form to send some short infos to an email
account, by a simple mailto: link.
We use Office 2003 and exchenge mail accounts.
Each worker have a personal mail account and can access to shared office
mailbox.
For some reasons(little stupit in my opinion.. :-/ ) the mail with form data
need to be sent from office mailbox, and should be found in the same account
sent box.
Normally any worker configure outlook with personal mail box as primary and
office shared as secondary, but this configuration force the worker to
reconfigure outlook to send form data (office as primary, personal as
secondary).
A waste of time.. and little boring.
I'll want to make all more simple and speedy.
I'd wrote the vb script do send my form data by mail from specified account,
using Outlook objects.
Let see (sorry mix of italian and english for variables and comments
)...
<script language="vbscript">
Sub Invia_Mail(Destinatario, Oggetto , CorpoMail, InviatoDa)
'Crea l'oggetto outlook
Dim Outlook
Set Outlook = CreateObject("Outlook.Application")
'Crea l'oggetto messaggio
Dim Message
Set Message = Outlook.CreateItem(olMailItem)
With Message
.Subject = Oggetto
.HTMLBody = CorpoMail 'qui creo via script il mio body in html a
partire dai dati inseriti nel form html
'Aggiungiamo il destinatario
.Recipients.Add (Destinatario)
'se è stato inserito un indirizzo email dal quale deve partire la mail,
lo si imposta qui
If Len(InviatoDa) > 0 Then .SentOnBehalfOfName = InviatoDa
'e adesso inviamo
.Send
End With
End Sub
</script>
All fork fine. Mail built and sent. Wow :-D
But there are some things that don't go.
And there a question that I leave at last (the main reason for my post).
1) Some security messages are shown before mail being sent, with the obvious
request to start or not mail message. I think there's no way (obvious) to
workaround this by script.. but there's a local security setting to avoid
this request?
2) Next i found that mail in outbox.. but it not go away!! Clicking on
sent/receive take no effects! The only way is to click on time on outbox...
the mail start immediately (????).
Is it a local problem.. or a bug.. or something else?
3) Now come my real question
All beautiful, all work.. goooood! NOT!
My sent mail be placed on my personal account if configured as primary :°(
I need it to be in the sent box of office account!
I want to check by script the "From" account.. and if personal account found
i need to make a copy of the message (or move) and place it in the office
Sent Box.
There's a problem.. How can I do it? :-D
I've asked to Dr. Google but now I'm little confused
3b) There's a way to check the configured accounts before all my damn
things? How?
I hope someone give me the light to show me the way
Many Thanks!