Android: Share plain text using intent (to all messaging apps)

Use the code as: /*Create an ACTION_SEND Intent*/ Intent intent = new Intent(android.content.Intent.ACTION_SEND); /*This will be the actual content you wish you share.*/ String shareBody = “Here is the share content body”; /*The type of the content is text, obviously.*/ intent.setType(“text/plain”); /*Applying information Subject and Body.*/ intent.putExtra(android.content.Intent.EXTRA_SUBJECT, getString(R.string.share_subject)); intent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody); /*Fire!*/ startActivity(Intent.createChooser(intent, getString(R.string.share_using)));

Check that an email address is valid on iOS [duplicate]

Good cocoa function: -(BOOL) NSStringIsValidEmail:(NSString *)checkString { BOOL stricterFilter = NO; // Discussion http://blog.logichigh.com/2010/09/02/validating-an-e-mail-address/ NSString *stricterFilterString = @”^[A-Z0-9a-z\\._%+-]+@([A-Za-z0-9-]+\\.)+[A-Za-z]{2,4}$”; NSString *laxString = @”^.+@([A-Za-z0-9-]+\\.)+[A-Za-z]{2}[A-Za-z]*$”; NSString *emailRegex = stricterFilter ? stricterFilterString : laxString; NSPredicate *emailTest = [NSPredicate predicateWithFormat:@”SELF MATCHES %@”, emailRegex]; return [emailTest evaluateWithObject:checkString]; } Discussion on Lax vs. Strict – http://blog.logichigh.com/2010/09/02/validating-an-e-mail-address/ And because categories are just better, … Read more

Is JavaScript supported in an email message?

http://en.wikipedia.org/wiki/Comparison_of_e-mail_clients Old clients, such as Lotus Notes, Mozilla Thunderbird, Outlook Express, and Windows Live Mail all seem to have supported some sort of JavaScript execution. Nothing else does. It seems like a bad idea security-wise, so I would expect this to be a feature that won’t always be around, even in these clients.

Making email addresses safe from bots on a webpage? [closed]

Working with content and attr in CSS: .cryptedmail:after { content: attr(data-name) “@” attr(data-domain) “.” attr(data-tld); } <a href=”#” class=”cryptedmail” data-name=”info” data-domain=”example” data-tld=”org” onclick=”window.location.href=”https://stackoverflow.com/questions/483212/mailto:” + this.dataset.name + ‘@’ + this.dataset.domain + ‘.’ + this.dataset.tld; return false;”></a> When javascript is disabled, just the click event will not work, email is still displayed. Another interesting approach (at least … Read more

How can I send an email by Java application using GMail, Yahoo, or Hotmail?

First download the JavaMail API and make sure the relevant jar files are in your classpath. Here’s a full working example using GMail. import java.util.*; import javax.mail.*; import javax.mail.internet.*; public class Main { private static String USER_NAME = “*****”; // GMail user name (just the part before “@gmail.com”) private static String PASSWORD = “********”; // … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)