|
IIRC (it was a long time ago) the best I was ever able to come up with was to validate the email address with regex and do a look up for the MX records of the domain of the email address.
This won't ensure the email address exists - daveym69[at]microsoft.com would pass (don't want spam bots hitting MS mail servers hence the [at]!), but at least you know it's properly formed and the domain actually has a mail server.
|
|
|
|
|
Hi there,
Have a look into CAPTCHA's.
If you don't like this, another option to add a hidden textbox. Spam bots will generally fill in every box on the page (hidden or not) and then submit the form.
All you have to do is check that the hidden box is empty - if not, it is a non-human user.
Cheers,
Mark Brock
"We're definitely not going to make a G or a PG version of this. It's not PillowfightCraft." -- Chris Metzen
|
|
|
|
|
I might be mistaken, but I think there's something in the SMTP protocol which allows this. If you're feeling particularly masochistic you could implement this. I think it works in a similar way to POP - that is, text based requests and responses.
|
|
|
|
|
I am using this code to send an email using MailMessage:
msg.Body = txtMessage.Text;
but it's all coming as one paragraph without the line breaks though I have enter key between every paragraph?
how can I fix this in Windows Application?
|
|
|
|
|
You should use the IsBodyHtml property like this:
mail.Body = "first line<br/>next line";
mail.IsBodyHtml = True
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
it is set to true.. but it's still not considering the ENTER key and it's all coming as one paragraph!
msg.Subject = subject;
msg.Body = message;
msg.IsBodyHtml = true;
|
|
|
|
|
jrahma wrote: but it's still not considering the ENTER k
And it will not. ENTER key is /r/n which is not html. The mail message expects the body message to be valid html else it gets confused.
Can you try this:
msg.Subject = subject;
message = message.Replace(@"\r\n", "<br/>");
msg.Body = message;
msg.IsBodyHtml = true;
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
I tried but it's still the same.. here is the code:
msg.Subject = subject;
message = message.Replace(@"\r\n", "");
msg.Body = message;
msg.IsBodyHtml = true;
|
|
|
|
|
jrahma wrote: I tried but it's still the same.. here is the code:
Ah!!! the text editor screwed the code
msg.Subject = subject;
message = message.Replace(@"\r\n", "<br/>");
msg.Body = message;
msg.IsBodyHtml = true;
Can you try the above?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
i want to know what's the best way to check for new version of my C# windows application while the application starts?
|
|
|
|
|
You can use Click Once[^] deployment.
only two letters away from being an asset
|
|
|
|
|
I am planning on writing a webservice that let's my app do this, and download updates. Clickonce has it's issues, not least that the programs don't end up in program files.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
can you share it in an article plz so we can also learn from it?
|
|
|
|
|
if I am going to use XML file to check the version, can I use Windows Live SkyDrive?
|
|
|
|
|
I want to know how can I send SMS from C# windows application using my windows mobile cell phone if I connect through USB cable or Bluetooth? so it will use my cell phone SIM card to send the SMS.
|
|
|
|
|
This gets asked here CONSTANTLY. You need to find a local service that allows you to do this, and subscribe to it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
i don't want an SMS gateway. What i want is to send the SMS through my cel phone SIM card which is connected to the PC via USB, just like what Nokia is doing in their Nokia PC Suite software
|
|
|
|
|
Try to search AT-Command on Google. Also u can search about AT-Command+java so that u will get a source code.
|
|
|
|
|
|
hi . i do not good speech English. i create e window form and add e user control. in the user control is a rich text box . user control have a public method ::
public void Select_All(){
this.richtextbox1.selectall();
}
in the frmMain for is a tab control and user control add in to tabcontrol .
uercontrol1 user = (usercontrol)tabcontrol1.selectedtab.control[0];
user.Select_all();
i add a child form in the frmMain and call the Sellect_All() method of the user control . but dont work !!!
|
|
|
|
|
Are you sure it's not working?
I just tried it here and I just needed to add user.Focus(); and all the text was selected.
|
|
|
|
|
hi,amir-haghighi
try it as follow
first, you should change the method in you main form
public void Select_All(RichTextBox rtb){
rtb.selectall();
}
and call the method Sellect_All(rtbChild);
"rtbChild" is the the richtextbox control in child form
good luck
|
|
|
|
|
|
|
Hello,
i've implemented an application that read from a local db and write on a server db using a transaction scope. When I try to commit the transaction i receive an exception error
:
System.Transactions.TransactionManagerCommunicationException: Impossible to comunicate with transaction manager...System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL ...
in System.Transactions.Oletx.IDtcProxyShimFactory.ReceiveTransaction(UInt32 propgationTokenSize, Byte[] propgationToken, IntPtr managedIdentifier, Guid& transactionIdentifier, OletxTransactionIsolationLevel& isolationLevel, ITransactionShim& transactionShim)
in System.Transactions.TransactionInterop.GetOletxTransactionFromTransmitterPropigationToken(Byte[] propagationToken)
I've enabled MSDTC on client and server but something is wrong.
Please help if you know the solution.
Thanks in advance
|
|
|
|