|
 |
asp_web_howto thread: ASP-Script that receives an EMail-message?
Message #1 by "Flurin Waelti" <flurin@q...> on Mon, 28 May 2001 09:01:37 -0700
|
|
Hi
Does anybody have experience how such a thing works.
On my hosting service, I can set up email-addresses that point to a
program. Is it possible to make this work together with an ASP Script? I
want to use a specific address, the message that arrives will be
received by the asp-script and then I can do with the information
whatever I want.
If this is possible - how can I access the email text that arrives?
I have different things that I want to accomplish with this. e.g:
- send information (in a standard format) that will be entered into a
database (by an asp-script).
- working with an online mailinglist (a message that I send will be
forwarded to all email-addresses that are stored in an online database)
- autoresponder to email
I appreciate any comments, even if they are negative.
Thanks a lot,
Flurin
Message #2 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Wed, 30 May 2001 15:48:55 +0100
|
|
An ASP script cannot "receive" an email, only a mailbox can...
Create a mailbox for your application. Then write a script in
VBScript/JScript, or a VB exe to use CDO to open the emails and parse
the
text within. This could be run as a batch process every night, or if
necessary immediately when a new mail is received.
-----Original Message-----
From: Flurin Waelti [mailto:flurin@q...]
Sent: 28 May 2001 17:02
To: ASP Web HowTo
Subject: [asp_web_howto] ASP-Script that receives an EMail-message?
Hi
Does anybody have experience how such a thing works.
On my hosting service, I can set up email-addresses that point to a =3D
program. Is it possible to make this work together with an ASP Script?
I =3D
want to use a specific address, the message that arrives will be =3D
received by the asp-script and then I can do with the information =3D
whatever I want.
If this is possible - how can I access the email text that arrives?
I have different things that I want to accomplish with this. e.g:
- send information (in a standard format) that will be entered into a
=3D
database (by an asp-script).=3D20
- working with an online mailinglist (a message that I send will be =3D
forwarded to all email-addresses that are stored in an online database)
- autoresponder to email
I appreciate any comments, even if they are negative.
Thanks a lot,
Flurin
________________________________________________________________________
Scottish Enterprise Network
http://www.scottish-enterprise.com
Message #3 by "JstMeHr4u3" <jstmehr4u3@h...> on Wed, 30 May 2001 14:24:56 -0700
|
|
I found the code.
Here it is for all to see, its In VB for an exe file:
Dim thismessage As MailItem
Me.Show
Screen.MousePointer = vbHourglass
On Error GoTo OutlookNotStarted
Set OLApp = CreateObject("Outlook.Application")
On Error GoTo NoMAPINameSpace
Set mNameSpace = OLApp.GetNamespace("MAPI")
Set AllMessages = mNameSpace.GetDefaultFolder(olFolderInbox).Items
MSFlexGrid1.ColWidth(0) = MSFlexGrid1.Width * 0.3
MSFlexGrid1.ColWidth(1) = MSFlexGrid1.Width * 0.5
MSFlexGrid1.ColWidth(2) = MSFlexGrid1.Width * 0.2
MSFlexGrid1.Row = 0
MSFlexGrid1.Col = 0: MSFlexGrid1.Text = "Sender"
MSFlexGrid1.Col = 1: MSFlexGrid1.Text = "Subject"
MSFlexGrid1.Col = 2: MSFlexGrid1.Text = "Date sent"
For Each thismessage In AllMessages
MSFlexGrid1.Row = MSFlexGrid1.Row + 1
MSFlexGrid1.Col = 0
MSFlexGrid1.Text = thismessage.SenderName
MSFlexGrid1.Col = 1
MSFlexGrid1.Text = thismessage.Subject
MSFlexGrid1.Col = 2
MSFlexGrid1.Text = thismessage.SentOn
Next
Screen.MousePointer = vbDefault
Exit Sub
OutlookNotStarted:
MsgBox "Could not start Outlook"
Screen.MousePointer = vbDefault
Exit Sub
NoMAPINameSpace:
MsgBox "Could not get MAPI NameSpace"
Screen.MousePointer = vbDefault
Exit Sub
'Obviously you need my form and the right controls, but you can get the idea
from here.
Mike Scott
----- Original Message -----
From: "Alex Shiell, ITS, EC, SE" <alex.shiell@s...>
To: "ASP Web HowTo" <asp_web_howto@p...>
Sent: Wednesday, May 30, 2001 7:48 AM
Subject: [asp_web_howto] RE: ASP-Script that receives an EMail-message?
An ASP script cannot "receive" an email, only a mailbox can...
Create a mailbox for your application. Then write a script in
VBScript/JScript, or a VB exe to use CDO to open the emails and parse the
text within. This could be run as a batch process every night, or if
necessary immediately when a new mail is received.
-----Original Message-----
From: Flurin Waelti [mailto:flurin@q...]
Sent: 28 May 2001 17:02
To: ASP Web HowTo
Subject: [asp_web_howto] ASP-Script that receives an EMail-message?
Hi
Does anybody have experience how such a thing works.
On my hosting service, I can set up email-addresses that point to a
program. Is it possible to make this work together with an ASP Script? I
want to use a specific address, the message that arrives will be
received by the asp-script and then I can do with the information
whatever I want.
If this is possible - how can I access the email text that arrives?
I have different things that I want to accomplish with this. e.g:
- send information (in a standard format) that will be entered into a
database (by an asp-script).
- working with an online mailinglist (a message that I send will be
forwarded to all email-addresses that are stored in an online database)
- autoresponder to email
I appreciate any comments, even if they are negative.
Thanks a lot,
Flurin
Message #4 by "JstMeHr4u3" <jstmehr4u3@h...> on Wed, 30 May 2001 14:18:57 -0700
|
|
Ok Alex, I have a question for you. Its on the subject of reading your
mailbox and putting it in the db...
How do you get the Actual email address from the email? In outlook/exchange,
I am only able to find the NAME of the person who sent the email. For
instance. Mike Scott, but email is jstmehr4u3@h... But no where can you
find that actuall email address.
Mike
----- Original Message -----
From: "Alex Shiell, ITS, EC, SE" <alex.shiell@s...>
To: "ASP Web HowTo" <asp_web_howto@p...>
Sent: Wednesday, May 30, 2001 7:48 AM
Subject: [asp_web_howto] RE: ASP-Script that receives an EMail-message?
An ASP script cannot "receive" an email, only a mailbox can...
Create a mailbox for your application. Then write a script in
VBScript/JScript, or a VB exe to use CDO to open the emails and parse the
text within. This could be run as a batch process every night, or if
necessary immediately when a new mail is received.
-----Original Message-----
From: Flurin Waelti [mailto:flurin@q...]
Sent: 28 May 2001 17:02
To: ASP Web HowTo
Subject: [asp_web_howto] ASP-Script that receives an EMail-message?
Hi
Does anybody have experience how such a thing works.
On my hosting service, I can set up email-addresses that point to a
program. Is it possible to make this work together with an ASP Script? I
want to use a specific address, the message that arrives will be
received by the asp-script and then I can do with the information
whatever I want.
If this is possible - how can I access the email text that arrives?
I have different things that I want to accomplish with this. e.g:
- send information (in a standard format) that will be entered into a
database (by an asp-script).
- working with an online mailinglist (a message that I send will be
forwarded to all email-addresses that are stored in an online database)
- autoresponder to email
I appreciate any comments, even if they are negative.
Thanks a lot,
Flurin
________________________________________________________________________
Scottish Enterprise Network
http://www.scottish-enterprise.com
Message #5 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Thu, 31 May 2001 09:49:43 +0100
|
|
use senderemail instead of sendername ;-)
-----Original Message-----
From: JstMeHr4u3 [mailto:jstmehr4u3@h...]
Sent: 30 May 2001 22:19
To: ASP Web HowTo
Subject: [asp_web_howto] RE: ASP-Script that receives an EMail-message?
Ok Alex, I have a question for you. Its on the subject of reading your
mailbox and putting it in the db...
How do you get the Actual email address from the email? In
outlook/exchange,
I am only able to find the NAME of the person who sent the email. For
instance. Mike Scott, but email is jstmehr4u3@h... But no where
can you
find that actuall email address.
Mike
----- Original Message -----
From: "Alex Shiell, ITS, EC, SE" <alex.shiell@s...>
To: "ASP Web HowTo" <asp_web_howto@p...>
Sent: Wednesday, May 30, 2001 7:48 AM
Subject: [asp_web_howto] RE: ASP-Script that receives an EMail-message?
An ASP script cannot "receive" an email, only a mailbox can...
Create a mailbox for your application. Then write a script in
VBScript/JScript, or a VB exe to use CDO to open the emails and parse
the
text within. This could be run as a batch process every night, or if
necessary immediately when a new mail is received.
-----Original Message-----
From: Flurin Waelti [mailto:flurin@q...]
Sent: 28 May 2001 17:02
To: ASP Web HowTo
Subject: [asp_web_howto] ASP-Script that receives an EMail-message?
Hi
Does anybody have experience how such a thing works.
On my hosting service, I can set up email-addresses that point to a =3D
program. Is it possible to make this work together with an ASP Script?
I =3D
want to use a specific address, the message that arrives will be =3D
received by the asp-script and then I can do with the information =3D
whatever I want.
If this is possible - how can I access the email text that arrives?
I have different things that I want to accomplish with this. e.g:
- send information (in a standard format) that will be entered into a
=3D
database (by an asp-script).=3D20
- working with an online mailinglist (a message that I send will be =3D
forwarded to all email-addresses that are stored in an online database)
- autoresponder to email
I appreciate any comments, even if they are negative.
Thanks a lot,
Flurin
|
|
 |