I am writing a web application will will be hosted on a few peoples laptops
as a local application. It will send e-mails once the user connects to the
internet.
How can I set up the "Mail.From" field if I don't know the address of the
user's laptop? I have managed to get it working on my own machine, but
setting the "From" filed to "Localhost" doesn't seem to work.
Any suggestions? 5 1497
Well, the laptop doesn't have an email address. The user does, and neither
the laptop nor your application has any way of just knowing what it is.
You need to have some sort of configuration page in your app, where the user
has to provide his/her email address.
"cashdeskmac" <ca*********@discussions.microsoft.com> wrote in message
news:67**********************************@microsof t.com... I am writing a web application will will be hosted on a few peoples laptops as a local application. It will send e-mails once the user connects to the internet.
How can I set up the "Mail.From" field if I don't know the address of the user's laptop? I have managed to get it working on my own machine, but setting the "From" filed to "Localhost" doesn't seem to work.
Any suggestions?
Marina,
would I be right in saying that I cannot have a generic name for the SMTP
server on the local computer, such as "Localhost"?
I have tried to send these automatic e-mails using my AOL account, but that
didn't work. I had to get a BT Internet account in order for this to work.
If any of the users have AOL, the application would be useless.
I need to find a way to be able to send the e-mails automatically regardless
of the ISP provider and preferably without having to ask for the user's
e-mails address.
If this is not possible, I will have to get the e-mail addresses in advance,
but I am hopeful of a solution...
"Marina" wrote: Well, the laptop doesn't have an email address. The user does, and neither the laptop nor your application has any way of just knowing what it is.
You need to have some sort of configuration page in your app, where the user has to provide his/her email address.
"cashdeskmac" <ca*********@discussions.microsoft.com> wrote in message news:67**********************************@microsof t.com...I am writing a web application will will be hosted on a few peoples laptops as a local application. It will send e-mails once the user connects to the internet.
How can I set up the "Mail.From" field if I don't know the address of the user's laptop? I have managed to get it working on my own machine, but setting the "From" filed to "Localhost" doesn't seem to work.
Any suggestions?
You were asking about how to specify who the email is coming from. At least
that is what it sounded like to me - not the name of the server. These are 2
really different things.
You can always get the name of the current machine from
System.Environment.MachineName. If the user has SMTP enabled on the machine,
you can then send out emails using that as the server.
You can't magically get a real, valid email address, which you still need,
since you have to say who is sending it.
"cashdeskmac" <ca*********@discussions.microsoft.com> wrote in message
news:CE**********************************@microsof t.com... Marina,
would I be right in saying that I cannot have a generic name for the SMTP server on the local computer, such as "Localhost"?
I have tried to send these automatic e-mails using my AOL account, but that didn't work. I had to get a BT Internet account in order for this to work. If any of the users have AOL, the application would be useless.
I need to find a way to be able to send the e-mails automatically regardless of the ISP provider and preferably without having to ask for the user's e-mails address.
If this is not possible, I will have to get the e-mail addresses in advance, but I am hopeful of a solution...
"Marina" wrote:
Well, the laptop doesn't have an email address. The user does, and neither the laptop nor your application has any way of just knowing what it is.
You need to have some sort of configuration page in your app, where the user has to provide his/her email address.
"cashdeskmac" <ca*********@discussions.microsoft.com> wrote in message news:67**********************************@microsof t.com... >I am writing a web application will will be hosted on a few peoples >laptops > as a local application. It will send e-mails once the user connects to > the > internet. > > How can I set up the "Mail.From" field if I don't know the address of > the > user's laptop? I have managed to get it working on my own machine, but > setting the "From" filed to "Localhost" doesn't seem to work. > > Any suggestions?
Marina,
I have tried creating a string variable which is set to the value of
System.Environment.machinename, but this is still not working.
SMTP is definately working on my machine, but this has not solved the problem.
I would appreciate any other suggestions.
"Marina" wrote: You were asking about how to specify who the email is coming from. At least that is what it sounded like to me - not the name of the server. These are 2 really different things.
You can always get the name of the current machine from System.Environment.MachineName. If the user has SMTP enabled on the machine, you can then send out emails using that as the server.
You can't magically get a real, valid email address, which you still need, since you have to say who is sending it.
"cashdeskmac" <ca*********@discussions.microsoft.com> wrote in message news:CE**********************************@microsof t.com... Marina,
would I be right in saying that I cannot have a generic name for the SMTP server on the local computer, such as "Localhost"?
I have tried to send these automatic e-mails using my AOL account, but that didn't work. I had to get a BT Internet account in order for this to work. If any of the users have AOL, the application would be useless.
I need to find a way to be able to send the e-mails automatically regardless of the ISP provider and preferably without having to ask for the user's e-mails address.
If this is not possible, I will have to get the e-mail addresses in advance, but I am hopeful of a solution...
"Marina" wrote:
Well, the laptop doesn't have an email address. The user does, and neither the laptop nor your application has any way of just knowing what it is.
You need to have some sort of configuration page in your app, where the user has to provide his/her email address.
"cashdeskmac" <ca*********@discussions.microsoft.com> wrote in message news:67**********************************@microsof t.com... >I am writing a web application will will be hosted on a few peoples >laptops > as a local application. It will send e-mails once the user connects to > the > internet. > > How can I set up the "Mail.From" field if I don't know the address of > the > user's laptop? I have managed to get it working on my own machine, but > setting the "From" filed to "Localhost" doesn't seem to work. > > Any suggestions?
> How can I set up the "Mail.From" field if I don't know the address of the user's laptop? I have managed to get it working on my own machine, but setting the "From" filed to "Localhost" doesn't seem to work.
Assuming you are using
System.Web.Mail.SmtpMail.Send()
try setting the first parameter to Nothing/null. I haven't messed with it
for a while, but it worked for me on one occasion. The email went out from
the default email account on the machine running the program. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: tzuccolo2001 |
last post by:
I'm trying to send an email using the mail() function. I've carefully
made use of the ini_set(SMTP, "mail.my.server") function to set my SMTP
server and also to set my From: address. I'm still...
|
by: Andy Hutchings |
last post by:
Hi everybody - hope you can help out here.
I have a form in a database, which is a columnar form from one of the tables
in the db - there is a sub-form to the form which is a datasheet view of...
|
by: Tony Cheng |
last post by:
Hi all,
I am using MailMessage Class to send email to my users. Because I want to
display sender name instead of sender email address, therefore, I set some
kind of this, "Tony Cheng...
|
by: Carlos |
last post by:
Hi all,
I currently have a task that calls to send an e-mail from a textbox, and
a field of a datagrid. When I send it from the multiline textbox, I notice
that
the text is sent as a single...
|
by: Peter H |
last post by:
Hi All.
I'm looking for a way to send multiple emails from an Access dataset where both 'To' and 'From' fields are taken from the data. Ideally I'd like it to be a VB script behind a 'user-friendly'...
|
by: eitan |
last post by:
אני מעוניין לשלוח דואר אלקטרוני בתוכנת
Windows Outlook 2003
אבל לא מעונין שהאדם שמקבל את הדוא"ל
יראה את השם שלי ב-FROM
האם יש אפשרות??
|
by: Jason Huang |
last post by:
Hi,
In my C# Windows form project, I can receieve the mail from the C# code,
however, it's EMPTY in the MAIL FROM:
Would someone give me some advice?
string Data;
byte szData;
TcpClient...
|
by: Neekos |
last post by:
Does anyone know how to change the FROM field in Outlook using VBA? I work for a company where people have the ability to send from different work groups. How do i go about changing this...
|
by: realin |
last post by:
Hiya all,
I m using pop3.class.php5.inc class from php classes
I am using their simple script, but i cant really get the sender information in the headers. Wht can be the error, i am able to...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |