Tag: 发送

如何使用Linux命令行发送HTML电子邮件

我需要发送HTML格式的电子邮件。 我只有Linux命令行和命令“邮件”。 目前已经使用: echo "To: address@example.com" > /var/www/report.csv echo "Subject: Subject" >> /var/www/report.csv echo "Content-Type: text/html; charset=\"us-ascii\"" >> /var/www/report.csv echo "<html>" >> /var/www/report.csv mysql -u ***** -p***** -H -e "select * from users LIMIT 20" dev >> /var/www/report.csv echo "</html>" >> /var/www/report.csv mail -s "Built notification" address@example.com < /var/www/report.csv 但在我的邮件代理,我只得到普通/文本。

使用蓝牙发送文件OBEX对象推送configuration文件(OPP)

有什么办法使用OBEX发送一个文件使用android蓝牙API? 我需要将文件发送到仅支持OBEX OPP的打印机。 我可以使用Android意图ACTION_SEND发送文件到打印机没有问题,但我需要以编程方式发送它。 我可以用方法createRfcommSocketToServiceRecord()使用OBEX OPP UUID(1105)连接到蓝牙打印机,但是我应该按照obex规范使用OBEX发送一个文件..这并不像将字节写入输出套接字那么简单。 。 但如果意图ACTION_SEND可以处理这个,为什么开发人员没有任何api发送文件? 我也检查了像BlueCove一些第三方库,但我仍然没有得到它的工作..(Nexus One&Galaxy Tab抛出一个exception,说本地库bluecove_armv71不可用..和LG Optimus One说bluecove_armv61 isn没有可用..) 我卡住了,有什么想法? 工作解决scheme 对于任何试图将文件发送到蓝牙设备而没有运气的人,我提供了一个使用内容提供商的工作解决scheme(感谢KPBird): 从这里抓取java类的BluetoothShare 以下代码将SD卡上的文件发送到蓝牙设备: BluetoothDevice device; String filePath = Environment.getExternalStorageDirectory().toString() + "/file.jpg"; ContentValues values = new ContentValues(); values.put(BluetoothShare.URI, Uri.fromFile(new File(filePath)).toString()); values.put(BluetoothShare.DESTINATION, device.getAddress()); values.put(BluetoothShare.DIRECTION, BluetoothShare.DIRECTION_OUTBOUND); Long ts = System.currentTimeMillis(); values.put(BluetoothShare.TIMESTAMP, ts); Uri contentUri = getContentResolver().insert(BluetoothShare.CONTENT_URI, values); UPDATE 有些人遇到上述解决scheme的问题,已经在以下设备上进行了testing: 适用于: LG […]

Android示例蓝牙代码通过蓝牙发送一个简单的string

我想通过蓝牙从Android设备发送一个简单的string数据,如“a”。 我在android sdk中查找了示例蓝牙代码,但对于我来说这非常复杂。 当我按下button时,我无法理解如何只发送特定的数据。 我该如何解决这个问题?

GSM SM5100B CMEERROR:4错误

我正在使用Arduino来控制一个SM5100B GSM设备,除了当我想在收到另一个短信时发送短信。 我得到这个, 错误代码: OK> + CMGS:2 5 OK + CMEERROR:4 我处理上述收到的短信的代码: #include <SoftwareSerial.h> //Include the NewSoftSerial library to send serial commands to the cellular module. char inchar; //Will hold the incoming character from the Serial Port. SoftwareSerial cell(2,3); char mobilenumber[] = "0597010129"; void setup() { //GSM Serial.begin(9600); // opens serial port, sets data rate […]

如何从一个活动发送string到另一个?

所以我在activity2中有一个string String message = String.format( "Current Location \n Longitude: %1$s \n Latitude: %2$s", lat, lng); 我想将这个string插入到activity1的文本字段中。 我怎样才能做到这一点? 先谢谢你。

通过PHP发送电子邮件中的HTML?

我怎样才能发送一个HTML格式的电子邮件与图片使用PHP? 我想有一个页面,其中有一些设置和HTML输出,通过电子邮件发送到一个地址。 我该怎么办? 主要的问题是附上files.how我可以做到这一点?