Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

controll e-mail senderID asp.net

Featured Replies

I have made a contact form on a web-site, where one of the fields to fill out is the senders e-mail adress.

When I try sending a mail to my self on a hotmail acount, the Hotmail always puts the email on the Junk E-mail folder. It stands that the sender-Id cannot be controlled..

This is the code that I use..

<%@ Import Namespace="System.Web.Mail" %>

<script runat="Server">
Sub Button_Click( s As Object, e As EventArgs )
SmtpMail.Send( _
mailfrom.Text, _
mailto.Text, _
mailsubject.Text, _
mailbody.Text )
End Sub
</Script>

<html>
<head><title>SendMail.aspx</title></head>
<body>

<h1>Send Mail:</h1>
<form runat="Server">

<b>From:</b>
<br>
<asp:TextBox
ID="mailfrom"
Columns="50"
Runat="Server" />
<p>
<b>To:</b>
<br>
<asp:TextBox
ID="mailto"
Columns="50"
Runat="Server" />
<p>
<b>Subject:</b>
<br>
<asp:TextBox
ID="mailsubject"
Columns="50"
Runat="Server" />
<p>
<b>Body:</b>
<br>
<asp:TextBox
ID="mailbody"
TextMode="Multiline"
Columns="50"
Rows="10"
Runat="Server" />
<p>
<asp:Button
Text="Send!"
OnClick="Button_Click"
Runat="Server" />
</form>

</body>
</html>

  • 3 months later...

I do not think the problem is in your code, as you said the mail is delivered at hotmail, so technicaly its working ;-)

It is more likely your mail is seen as 'potential spam' because the sender address (domain name eg microsoft.com) is not the same address your mailserver ( servername = mywebsite.com).

To circumvent having your mail end up in the spamfilters configure script to send the mail with a mail address that does reside on your own webserver.

You need to be carefull with scripts like these though, people may abuse them to send spam and if that happens you may get blacklisted. The best use for scripts like these in my opinion is to only send mail from the form to your own address.

:)

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.